The primary sources tool can add references to existing claims. For some reason, it started re-adding the claim yesterday instead.
Did anything change on the Wikidata-side in the last few days that could be causing this change in behavior? Or should we look harder on the Primary sources side?
Bug is being tracked here:
On Tue, Apr 5, 2016 at 10:29 PM Denny Vrandečić vrandecic@gmail.com wrote:
The primary sources tool can add references to existing claims. For some reason, it started re-adding the claim yesterday instead.
Did anything change on the Wikidata-side in the last few days that could be causing this change in behavior? Or should we look harder on the Primary sources side?
Bug is being tracked here:
I am not aware of a recent change that should influence this. If you find it is something in Wikibase please let me know.
Cheers Lydia
Hi Lydia,
I think the problem is that instead of a semantic comparison, Wikibase does a pure string comparison to check if two timestamps are equal. I changed the primary sources tool on the weekend because there was a bug in the serialization according to the TSV format specification (it failed a roundtrip serialize-parse test), which says the year in a timestamp is 11 digits, 0-padded if necessary (i.e. +00000001947 instead of +1947). This might have broken the comparison.
The weird thing is that later (probably when storing the value in the database), Wikibase does the right thing (i.e. parses the year even including leading 0's). So I guess the comparison is happening before that.
I can fix that by rolling back my change that introduced the 0-padding, but the consequence is that it will no longer follow the definition at http://tools.wmflabs.org/wikidata-todo/quick_statements.php . Or we change the Javascript frontend part to eliminate all padding 0 before sending the timestamp to the API. But since 0-padding is semantically valid for numbers, I'd prefer to have a look in the Wikibase backend. There might be other situations affected by string comparison issues.
Cheers,
Sebastian
On Wed, Apr 6, 2016 at 1:24 PM Lydia Pintscher Lydia.Pintscher@wikimedia.de wrote:
On Tue, Apr 5, 2016 at 10:29 PM Denny Vrandečić vrandecic@gmail.com wrote:
The primary sources tool can add references to existing claims. For some reason, it started re-adding the claim yesterday instead.
Did anything change on the Wikidata-side in the last few days that could be causing this change in behavior? Or should we look harder on the Primary sources side?
Bug is being tracked here:
I am not aware of a recent change that should influence this. If you find it is something in Wikibase please let me know.
Cheers Lydia -- Lydia Pintscher - http://about.me/lydia.pintscher Product Manager for Wikidata
Wikimedia Deutschland e.V. Tempelhofer Ufer 23-24 10963 Berlin www.wikimedia.de
Wikimedia Deutschland - Gesellschaft zur Förderung Freien Wissens e. V.
Eingetragen im Vereinsregister des Amtsgerichts Berlin-Charlottenburg unter der Nummer 23855 Nz. Als gemeinnützig anerkannt durch das Finanzamt für Körperschaften I Berlin, Steuernummer 27/029/42207.
On Wed, Apr 6, 2016 at 1:32 PM Sebastian Schaffert schaffert@google.com wrote:
Hi Lydia,
I think the problem is that instead of a semantic comparison, Wikibase does a pure string comparison to check if two timestamps are equal. I changed the primary sources tool on the weekend because there was a bug in the serialization according to the TSV format specification (it failed a roundtrip serialize-parse test), which says the year in a timestamp is 11 digits, 0-padded if necessary (i.e. +00000001947 instead of +1947). This might have broken the comparison.
The weird thing is that later (probably when storing the value in the database), Wikibase does the right thing (i.e. parses the year even including leading 0's). So I guess the comparison is happening before that.
I can fix that by rolling back my change that introduced the 0-padding, but the consequence is that it will no longer follow the definition at http://tools.wmflabs.org/wikidata-todo/quick_statements.php . Or we change the Javascript frontend part to eliminate all padding 0 before sending the timestamp to the API. But since 0-padding is semantically valid for numbers, I'd prefer to have a look in the Wikibase backend. There might be other situations affected by string comparison issues.
Thank you! Will look closer into it with Thiemo next week when I am back in the office and he hasn't seen it before.
Cheers Lydia
Hi,
the "definition" at Magnus' http://tools.wmflabs.org/wikidata-todo/quick_statements.php is outdated. Magnus, can you please remove the leading zeros from the year?
Padding years to 11 digits is not done any more. For a while there was no padding at all in the backend, while some documentation talked about 16 digits and the frontend still padded to 11 digits. All at the same time. :-( We fixed this about a year ago and decided to always pad years to 4 digits because this minimizes storage space while being the most convenient strategy for users.
Best Thiemo
Removed from the instructions. They were removed before adding statements anyway.
On Wed, Apr 6, 2016 at 5:49 PM Thiemo Mättig thiemo.maettig@wikimedia.de wrote:
Hi,
the "definition" at Magnus' http://tools.wmflabs.org/wikidata-todo/quick_statements.php is outdated. Magnus, can you please remove the leading zeros from the year?
Padding years to 11 digits is not done any more. For a while there was no padding at all in the backend, while some documentation talked about 16 digits and the frontend still padded to 11 digits. All at the same time. :-( We fixed this about a year ago and decided to always pad years to 4 digits because this minimizes storage space while being the most convenient strategy for users.
Best Thiemo
Is this answer from TPT related? https://github.com/google/primarysources/issues/90#issuecomment-206256966. Sorry, I am at a multi-day event this week and am a bit behind on emails. If it is, I am happy to quickly merge a pull request if anyone creates it :-)
On Thu, Apr 7, 2016 at 12:27 AM Lydia Pintscher < Lydia.Pintscher@wikimedia.de> wrote:
On Tue, Apr 5, 2016 at 10:29 PM Denny Vrandečić vrandecic@gmail.com wrote:
The primary sources tool can add references to existing claims. For some reason, it started re-adding the claim yesterday instead.
Did anything change on the Wikidata-side in the last few days that could be causing this change in behavior? Or should we look harder on the Primary sources side?
Bug is being tracked here:
I am not aware of a recent change that should influence this. If you find it is something in Wikibase please let me know.
Something changed in the last few days, probably related: https://phabricator.wikimedia.org/T132053
Cheers Lydia -- Lydia Pintscher - http://about.me/lydia.pintscher Product Manager for Wikidata
Wikimedia Deutschland e.V. Tempelhofer Ufer 23-24 10963 Berlin www.wikimedia.de
Wikimedia Deutschland - Gesellschaft zur Förderung Freien Wissens e. V.
Eingetragen im Vereinsregister des Amtsgerichts Berlin-Charlottenburg unter der Nummer 23855 Nz. Als gemeinnützig anerkannt durch das Finanzamt für Körperschaften I Berlin, Steuernummer 27/029/42207. _______________________________________________ Wikidata-tech mailing list Wikidata-tech@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-tech
wikidata-tech@lists.wikimedia.org