Last modified: 2014-11-17 10:36:39 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T47221, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 45221 - Document Special:PermanentLink and Special:Diff in the interface
Document Special:PermanentLink and Special:Diff in the interface
Status: PATCH_TO_REVIEW
Product: MediaWiki
Classification: Unclassified
Special pages (Other open bugs)
1.21.x
All All
: Normal enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
: easy
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-02-21 07:49 UTC by Matthew Flaschen
Modified: 2014-11-17 10:36 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Matthew Flaschen 2013-02-21 07:49:22 UTC
As noted at https://en.wikipedia.org/w/index.php?title=Wikipedia:Village_pump_%28technical%29&oldid=539378665#How_to_edit.E2.80.94or_request_an_edit.E2.80.94of_Special:SpecialPages, Special:PermanentLink is not documented at Special:SpecialPages.
Comment 1 Nemo 2013-05-27 20:55:04 UTC
HSJ pointed to https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=includes/SpecialPageFactory.php;h=4d635536a75f42074314abbb51a9b49634d255d8;hb=refs/heads/master#l155

https://en.wikipedia.org/wiki/Special:PermanentLink gives "No such target page". Standard way to "document" such redirects is to use them in the interface, but the sidebar link includes the page title too.
Comment 2 Hazard-SJ 2013-05-27 20:56:30 UTC
(Hazard-SJ) :P
Comment 3 Bartosz Dziewoński 2014-04-05 16:54:08 UTC
I would say this affects Special:Diff too.

Fixing this would basically require doing two things for each of the affected special pages:

* Adding `public function isListed() { return true; }` (see
  e.g. SpecialCreateAccount for an example).
* Making them generate a form with brief instructions instead of an exception
  when no parameters are provided (see e.g. SpecialComparePages for an
  example, I think).
Comment 4 PiRSquared17 2014-04-22 18:03:06 UTC
(In reply to Bartosz Dziewoński from comment #3)
> I would say this affects Special:Diff too.
> 
> Fixing this would basically require doing two things for each of the
> affected special pages:
> 
> * Adding `public function isListed() { return true; }` (see
>   e.g. SpecialCreateAccount for an example).
> * Making them generate a form with brief instructions instead of an exception
>   when no parameters are provided (see e.g. SpecialComparePages for an
>   example, I think).

It would be easy to accomplish, but generating a form would mean they would no longer extend RedirectSpecialPage. It's definitely feasible (e.g., mock-up <http://pirsquared-dev.wmflabs.org/wiki/Special:PermanentLink>), but is there any problem with changing the inheritance?
Comment 5 Bartosz Dziewoński 2014-04-22 18:31:54 UTC
(In reply to PiRSquared17 from comment #4)
> It would be easy to accomplish, but generating a form would mean they would
> no longer extend RedirectSpecialPage. It's definitely feasible (e.g.,
> mock-up <http://pirsquared-dev.wmflabs.org/wiki/Special:PermanentLink>), but
> is there any problem with changing the inheritance?

There isn't, the SpecialPage subclasses exist only for convenience.
If you are concerned, then you could just override the execute() method.
Comment 6 Gerrit Notification Bot 2014-04-23 03:38:33 UTC
Change 129095 had a related patch set uploaded by Gerrit Patch Uploader:
Document Special:Diff and Special:PermanentLink

https://gerrit.wikimedia.org/r/129095

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links