Page MenuHomePhabricator

Failed to get claim from claim Serialization after a reference is added using wbsetreference
Closed, ResolvedPublic

Description

Reported on https://www.wikidata.org/wiki/Wikidata:Contact_the_development_team#Strange_error_message

When trying to edit the claim value for a calim that has had a reference added through wbsetreference we get the error message

"Failed to get claim from claim Serialization If a hash is present in a reference serialization it needs to be correct"

It appears something is wrong with the hash which makes it uneditable?


Version: unspecified
Severity: normal

Details

Reference
bz56623

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 2:40 AM
bzimport set Reference to bz56623.
bzimport added a subscriber: Unknown Object (MLST).

As far as I can tell / guess this is caused by the change in the date in the reference which can be seen at http://www.diffchecker.com/b04b7pee

The date changing from "time":"+00000002013-10-18T17:21:07Z", to "time":"+00000002013-10-18T00:00:00Z", seems to make the claim editable again?

per testing on https://www.wikidata.org/wiki/Q15078282

So, to update the bug it looks like around 40,000 claims are affected by this per the conversation on Contact the Dev Team.
This will be the claims for P141 created by SuccuBot https://www.wikidata.org/wiki/Special:WhatLinksHere/Property:P141
These can be fixed by simply passing in a new date.

Of course there is still something in the code of wbsetreferece / the validators parsers etc that needs to be fixed to stop this happening in the future..

Can reproduce on master with

https://www.wikidata.org/wiki/Special:ApiSandbox#action=wbsetreference&format=json&statement=Q4115189$ff893c9e-4c9b-d34e-fb74-f40a8e5e38ea&snaks={ "P248":[ { "snaktype":"value", "property":"P248", "datavalue":{ "value":{ "entity-type":"item", "numeric-id":15043677 }, "type":"wikibase-entityid" } } ], "P627":[ { "snaktype":"value", "property":"P627", "datavalue":{ "value":"106003204", "type":"string" } } ], "P813":[ { "snaktype":"value", "property":"P813", "datavalue":{ "value":{ "time":"+00000002013-10-05T15:24:21Z", "timezone":0, "before":0, "after":0, "precision":11, "calendarmodel":"http://www.wikidata.org/entity/Q1985727" }, "type":"time" } } ] }&summary=test&token=TOKEN

Change 93944 had a related patch set uploaded by Addshore:
Add validation for wbsetreference....

https://gerrit.wikimedia.org/r/93944

Change 93944 merged by jenkins-bot:
ReAdd validation for wbsetreference....

https://gerrit.wikimedia.org/r/93944

Change 94141 had a related patch set uploaded by Addshore:
ReAdd validation for wbsetreference....

https://gerrit.wikimedia.org/r/94141

Change 94141 merged by Aude:
ReAdd validation for wbsetreference....

https://gerrit.wikimedia.org/r/94141

Change 94180 had a related patch set uploaded by Aude:
Update Wikibase, fixes issues with references caught by selenium tests

https://gerrit.wikimedia.org/r/94180

Change 94180 merged by Reedy:
Update Wikibase, fixes issues with references caught by selenium tests

https://gerrit.wikimedia.org/r/94180