Last modified: 2007-06-14 03:15:08 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 T12147, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 10147 - Silent normalization of interwiki titles
Silent normalization of interwiki titles
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-06-05 15:53 UTC by Roan Kattouw
Modified: 2007-06-14 03:15 UTC (History)
2 users (show)

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


Attachments

Description Roan Kattouw 2007-06-05 15:53:46 UTC
Compare (and watch the pageids):
http://www.mediawiki.org/w/api.php?action=query&prop=info&format=jsonfm&titles=API
http://www.mediawiki.org/w/api.php?action=query&prop=info&format=jsonfm&titles=en:API
http://www.mediawiki.org/w/api.php?action=query&prop=info&format=jsonfm&titles=de:API
http://www.mediawiki.org/w/api.php?action=query&prop=info&format=jsonfm&titles=yz:API

Because de: and en: are interwiki bindings, they are stripped off the title, and the information for API is returned instead (the responses to the first three requests are identical). This doesn't happen with yz:API, because yz: isn't an interwiki binding. The API first normalizes yz:API to Yz:API and then tells us it doesn't exist. But en:API and de:API were also 'normalized' to API without notice.

Basically, my two problems are:
1. We shouldn't normalize de:API to API, because they have very different meanings. I have no idea what else to do, but the current behavior is misleading at best.
2. *If* we normalize de:API to API, we should tell the user.

Of course, if and when siprop=interwiki is implemented it'll fix this problem for me since I can use it to avoid passing interwiki titles, but in the meantime, this is still a bug.
Comment 1 Brion Vibber 2007-06-05 16:02:36 UTC
In most cases an interwiki title probably wouldn't be a valid input here; sensible thing is likely to check for the presence of the interwiki marker on the title object and throw an error for invalid input.
Comment 2 Yuri Astrakhan 2007-06-05 16:09:52 UTC
Would it make sense to place de:API in a separate section, just like "normalized"? Once in that section, no additional processing will be done.
On the other hand, en:API would be converted to API transparently.

I'm still thinking of how to better implement this...
Comment 3 Roan Kattouw 2007-06-05 18:01:14 UTC
Placing de:API in a separate interwiki section would make the most sense. As you said only things like en:API (where en: is a binding to self) should be normalized, but *even then*, it should show up in the "normalized" array.
Comment 4 Yuri Astrakhan 2007-06-14 03:15:08 UTC
fixed in r22974

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


Navigation
Links