Last modified: 2013-03-13 11:23:04 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 T34680, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 32680 - MediaWiki needs a sane way to disable SpecialPages
MediaWiki needs a sane way to disable SpecialPages
Status: REOPENED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: 32679
  Show dependency treegraph
 
Reported: 2011-11-28 13:05 UTC by Sam Reed (reedy)
Modified: 2013-03-13 11:23 UTC (History)
6 users (show)

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


Attachments

Description Sam Reed (reedy) 2011-11-28 13:05:41 UTC
2 options that come to mind:

How the API does it - We have a "Special:DisabledPage" or similar, and to disable an extension, in LocalSettings.php you can do

$wgSpecialPages['ContributionHistory'] = 'DisabledSpecialPage';


Else, a global array variable, key is the special page name, value is the message to display to users
Comment 1 Ariel T. Glenn 2011-11-28 13:12:55 UTC
I had both in mind actually: the array specifies the mssage text (and there is some reasonable default); that's checked by DisabledSpecialPage if/when it runs, assuming it can figure out who it is impersonating.
Comment 2 Brion Vibber 2011-11-28 18:01:50 UTC
What's the primary use case for disabling special pages? Temporarily turning off poorly-cached query pages that load up the site? Or permanently disabling features that people don't want to expose in their user interface (eg the frequent support requests like "how can I turn off RecentChanges?")
Comment 3 Sam Reed (reedy) 2011-11-28 18:03:08 UTC
(In reply to comment #2)
> What's the primary use case for disabling special pages? Temporarily turning
> off poorly-cached query pages that load up the site? Or permanently disabling
> features that people don't want to expose in their user interface (eg the
> frequent support requests like "how can I turn off RecentChanges?")

It was more in the case of the site issues this weekend.

So we can disable 1 bad special page, rather than having to turn off all of the extension (or live hacking it out in the extensions loader code)
Comment 4 Antoine "hashar" Musso (WMF) 2011-12-07 14:46:23 UTC
Add the following at the bottom of your LocalSettings.php :

$wgSpecialPages['RecentChanges'] = null;
Comment 5 Sam Reed (reedy) 2011-12-07 14:48:50 UTC
What error message does this give?

Is it documented?
Comment 6 Arthur Richards 2011-12-07 18:22:22 UTC
Kaldari implemented this for the ContributionReporting extension in r104478 to temporarily disable it on the cluster with a friendly message. Perhaps this could be replicated elsewhere/moved into its own extension/etc.
Comment 7 Sam Reed (reedy) 2011-12-07 19:30:25 UTC
(In reply to comment #6)
> Kaldari implemented this for the ContributionReporting extension in r104478 to
> temporarily disable it on the cluster with a friendly message. Perhaps this
> could be replicated elsewhere/moved into its own extension/etc.

Pushing it into core should be fine
Comment 8 Sam Reed (reedy) 2011-12-07 19:45:59 UTC
The result of setting it to null is:

No such special page
You have requested an invalid special page.
A list of valid special pages can be found at Special pages.
Return to Main Page.


It doesn't give any more information. Kaldaris work which Arthur linked to is definately a step in the right direction, even if it doesn't take care of the problem 100% - Per Ariel, it might be nicer to be able to give a reason per page to keep it easily customisable
Comment 9 Antoine "hashar" Musso (WMF) 2011-12-08 09:04:44 UTC
Sorry Sam, I have misread that bug. I thought it was someone asking how to disable RecentChanges entirely :-)

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


Navigation
Links