Last modified: 2011-09-11 04:36:50 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 T28823, the corresponding Phabricator task for complete and up-to-date bug report information.
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)
unspecified
All All
: Normal minor with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
http://en.wikipedia.org/wiki/Template...
:
Depends on:
Blocks:
  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: ---


Attachments

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.

http://en.wikipedia.org/wiki/Template:POTD navigation
http://en.wikipedia.org/wiki/Template:Pic_of_the_day
Comment 1 Erwin Dokter 2011-01-21 01:46:46 UTC
Fix link:
http://en.wikipedia.org/wiki/Template:POTD_navigation
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.


Navigation
Links