Page MenuHomePhabricator

wgCanonicalSpecialPageName is set wrong on pages named like special pages
Closed, ResolvedPublic

Description

The javascript variable wgCanonicalSpecialPageName is set wrong on pages named like special pages.

Look at [[mw:Manual:Watchlist]]: wgCanonicalSpecialPageName="Watchlist", wgTitle="Watchlist"

but we are not an the watchlist ([[mw:Special:Watchlist]]) that breaks js with only look for the canonical name.


Version: unspecified
Severity: enhancement
URL: http://www.mediawiki.org/wiki/Manual:Watchlist

Details

Reference
bz21115

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:55 PM
bzimport set Reference to bz21115.
bzimport added a subscriber: Unknown Object (MLST).

Should the variable be always defined and false, or only defined when in ns_special namespace?

brion added a comment.Oct 14 2009, 6:03 PM

Hmm, honestly it should be safe to just drop it when not on a special page... undefined var should evaluate as false in boolean checks.

But if we want to be sticklers, we can leave it in as false -- that's current behavior (when not on a page that happens to share a special page name ;)

Fix leaving wgCanonicalSpecialPageName as false for normal pages

Attached:

IAlex added a comment.Oct 14 2009, 8:35 PM

Fixed in r57721.