Last modified: 2011-09-11 04:36:50 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 26823 - {{SUBPAGENAME}} should be empty when no subpage exists
{{SUBPAGENAME}} should be empty when no subpage exists
Status: NEW
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
All All
: Normal minor with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
  Show dependency treegraph
Reported: 2011-01-21 01:46 UTC by Erwin Dokter
Modified: 2011-09-11 04:36 UTC (History)
1 user (show)

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


Description Erwin Dokter 2011-01-21 01:46:06 UTC
{{SUBPAGENAME}} returns the base page name when no subpage exists, even when subpages are allowed (such as Template: space on en:wiki). This causes lots of templates to spew out ugly errors (see URL, where {{SUBPAGENAME}} is used within #time:), which could be avoided. I cannot see the use of returning the base page in these cases; it should return nothing when there is no subpage. navigation
Comment 1 Erwin Dokter 2011-01-21 01:46:46 UTC
Fix link:
Comment 2 Bawolff (Brian Wolff) 2011-09-11 04:36:50 UTC
Do we know if this would break stuff (and how much) if this was changed? The change is trivial, and does make sense to me personally, but I'd be afraid of breaking people's templates...

(Another way of looking at it, is {{SUBPAGENAME}} gives the highest level of the directory structure of the page title, in which case the current behaviour would make sense. That's what the comment in the code seems to imply - "Get the lowest-level subpage name, i.e. the rightmost part after /" )

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