Page MenuHomePhabricator

default wikibase-docker installation creates quantity values with invalid unit-concept-URI
Open, Needs TriagePublic

Description

  1. Start a wikibase-docker container with an unmodified docker-compose.yml from [1].
  2. Create an item "kilogram" (Q1).
  3. Create a property "mass" (P1) with datatype "quantity".
  4. Create an item "apple" (Q2).
  5. Add a statement "apple" -> "mass" -> 0.5 kilogram.
  6. In the query interface, run the query select * where {?s ?p ?o}.

Observed:

Additional information:
Trying to create a quantity-valued statement using the API (wbeditentity) fails if the "unit" entry is "http://wikibase.svc/entity/Q1".

[1] https://github.com/wmde/wikibase-docker

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

The issue seems to be that the API expects the unit item to be of the form location + /entity/QID instead of concept base URI + QID, where location is the address on which the wikibase instance is accessible (say, the main page).
For Wikidata this is not an issue because users go to wikidata.org and edit there: location and concept base URI coincide (more or less).
However, in a production environment, edits might happen on a temporary URL before pushing the instance to the production URL. For both instances (temporary and production) the concept base URI is the same. Therefore, the unit item should start with the concept base URI.