Last modified: 2011-09-11 04:36:50 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
Fix link: http://en.wikipedia.org/wiki/Template:POTD_navigation
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 /" )