Page MenuHomePhabricator

Silent normalization of interwiki titles
Closed, ResolvedPublic


Compare (and watch the pageids):

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.

Version: unspecified
Severity: normal



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:50 PM
bzimport set Reference to bz10147.
bzimport added a subscriber: Unknown Object (MLST).

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.

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...

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.