Hi everyone,


This is a breaking change announcement relevant for some Wikibase API users.


What is Changing?

On 2 July 2024, we will enable the EntitySchema data type on Wikidata, and we expect the community to create the first properties with that data type and start using them in statements shortly afterwards. This means that there will be values with the data value type wikibase-entityid containing an EntitySchema ID (with "entity-type": "entity-schema" in the JSON value). However, EntitySchema is not yet a full-featured Wikibase entity type; it is our intention to eventually make it work like other entity types (Item, Property, etc.), but at the moment, using EntitySchema in e.g. the wbgetentities API or Special:EntityData does not work.


Who is Affected?

Code which assumes that IDs found in wikibase-entityid data values can be used with other Wikibase entity APIs may need adjusting.


Other Wikibases instances besides Wikidata are not affected unless they also use the EntitySchema extension and set $wgEntitySchemaEnableDatatype = true.


What You Need to Do

If your code works with statements of arbitrary data types, and looks up entities referenced in values with the data value type wikibase-entityid, you probably want to check that the entity-type is not entity-schema before proceeding. (Note that, if your goal is to display the value, you can instead use the wbformatvalue API for any data type.)


If you use the wbformatvalue API, you should make sure that you also specify the datatype or property parameter (depending on which information you have available; note that specifying both parameters at once is an error). Without this information, not all values can be formatted correctly; in particular, trying to format an EntitySchema value without specifying the datatype or property will result in an error (“An illegal set of parameters have been used”). (Specifying the datatype or property parameter for wbformatvalue has always been advisable, and necessary for some other data value types, but this is the first time it becomes relevant for wikibase-entityid data values.)


As previously announced, the new data type is already enabled on Test Wikidata, so you can try out the behaviour there. (An example item on Test Wikidata with a statement linking to an EntitySchema is human.) If you have any questions or concerns about this change, please don’t hesitate to reach out to us in this ticket (T332157).


Cheers,

Lydia

--
Lydia Pintscher - https://lydiapintscher.de - WD:Q18016466
Portfolio Lead for Wikidata

Wikimedia Deutschland e. V. | Tempelhofer Ufer 23-24 | 10963 Berlin
Phone: +49 (0)30-577 11 62-0
https://wikimedia.de

Imagine a world in which every single human being can freely share in the sum of all knowledge. Help us to achieve our vision!
https://spenden.wikimedia.de

Wikimedia Deutschland — Gesellschaft zur Förderung Freien Wissens e. V. Eingetragen im Vereinsregister des Amtsgerichts Charlottenburg, VR 23855 B. Als gemeinnützig anerkannt durch das Finanzamt für Körperschaften I Berlin, Steuernummer 27/029/42207. Geschäftsführende Vorstände: Franziska Heine, Dr. Christian Humborg