Last modified: 2011-05-23 18:46: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 T31108, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 29108 - mw.util.getTitleFrom wrong for special pages with parameter after a slash
mw.util.getTitleFrom wrong for special pages with parameter after a slash
Status: RESOLVED WORKSFORME
Product: MediaWiki
Classification: Unclassified
JavaScript (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-05-23 07:24 UTC by Michael M.
Modified: 2011-05-23 18:46 UTC (History)
1 user (show)

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


Attachments

Description Michael M. 2011-05-23 07:24:32 UTC
mw.util.getTitleFrom('http://translatewiki.net/wiki/Special:Contributions/Krinkle') returns 'Special:Contributions/Krinkle' though it should return 'Special:Contributions' only as mw.util.getTitleFrom('http://translatewiki.net/w/index.php?title=Special:Contributions&target=Krinkle') does.
Comment 1 Brion Vibber 2011-05-23 18:46:04 UTC
Looks like it should indeed return 'Special:Contributions/Krinkle', so it's working as intended.

The second URL you give is not equivalent, because the overall wiki system has no way of knowing how Special:Contributions will interpret a subpage parameter; the second URL does not use a subpage parameter, but rather a separate GET parameter that's *not* part of the title.

The one problem I see here is that getTitleFrom is documented to return a Title object since r88276, but it seems to return a string. Will mark that on CR.

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


Navigation
Links