Page MenuHomePhabricator

API now uses uppercase ids
Closed, DeclinedPublic


The API has always normalized ids to become lowercase, and because of this bots/scripts have come to depend upon it.

Both of those now use uppercase ids.

Version: unspecified
Severity: blocker



Event Timeline

bzimport raised the priority of this task from to Unbreak Now!.Nov 22 2014, 1:59 AM
bzimport set Reference to bz53894.
bzimport added a subscriber: Unknown Object (MLST).

The Lua API is also affected. This issue affect the 1.22wmf16 version.

This is caused by the decision to get rid of inconsistent use of lowercase and uppercase ids.

Possible solutions:

  • change the serializers to force lower case IDs unconditionally.
  • or add an option "lowercaseids" to all API modules.

PS: we have prefixed ids in the database in some places. there might also be some potential for breakage there.

add an option "lowercaseids" to all API modules just seems silly :/

This would require everyone that wants lowercase IDs to change their code anyway, so it would then make more sense for them to change the code to ignore case..

We are working to minimize the impact, but decided to stick with the decision to move to upper case IDs everywhere. Marking wontfix.

(bringing information from the mailing list into this ticket for historical reference, and possible further follow up on what happened.)

@daniel announced this breaking change on the wikidata-tech mailing list.

@Lokal_Profil indicated that was returning lowercase ids

@aude replied that the code to populate the page_props table had been updated to store uppercase, and that old lowercase records will over time become uppercase ids as the page_props records are updated. In the meantime both lower and upper ids will exist.

Was there any other related relevant discussions?

Have all lower case ids been removed from Wikidata clients page_props ? Any idea when the transition completed, or was it sped up by using a batch job?