Page MenuHomePhabricator

WikibaseLexeme UI doesn't use updated baserevid once lexeme statement has been created
Closed, ResolvedPublic

Description

Reproduction (while creating and removing a statement with no page reload:

  • Create an item
  • Create any statement & save it
  • Try to remove the statement
  • You'll receive the error message

Other reproductions are possible, and I guess this will work for any cases when you create and save a statement and then try to change it in any way without reloading the page.
On Items the updated baserevid is used.
This only seems to happen with Lexeme statements and not with Form statements.

Network requests:

The request to create the statement was:

action: wbsetclaim
format: json
claim: {"type":"statement","mainsnak":{"snaktype":"value","property":"P730","datavalue":{"type":"wikibase-entityid","value":{"id":"Q365815"}}},"id":"L11$ca0a13c9-424d-0a4e-c8c7-53a39bd870d1","rank":"normal"}
baserevid: 1002877
bot: 1
token: XXXX+\

With response:

{"pageinfo":{"lastrevid":1002878},"success":1,"claim":{"mainsnak":{"snaktype":"value","property":"P730","hash":"ad5cce903831858c590742e23a8e808227e5ae71","datavalue":{"value":{"entity-type":"item","numeric-id":365815,"id":"Q365815"},"type":"wikibase-entityid"},"datatype":"wikibase-item"},"type":"statement","id":"L11$ca0a13c9-424d-0a4e-c8c7-53a39bd870d1","rank":"normal"}}

And the remove request was:

action: wbremoveclaims
format: json
claim: L11$ca0a13c9-424d-0a4e-c8c7-53a39bd870d1
baserevid: 1002877
bot: 1
token: XXX+\

With response:

{"error":{"code":"invalid-guid","info":"Invalid claim guid.","messages":[{"name":"wikibase-api-invalid-guid","parameters":[],"html":{"*":"Invalid claim guid."}}],"*":"See https://wikidata.beta.wmflabs.org/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes."},"servedby":"deployment-mediawiki-09"}

Reloading the page and removing again succeeds with the following request:

action: wbremoveclaims
format: json
claim: L11$ca0a13c9-424d-0a4e-c8c7-53a39bd870d1
baserevid: 1002878
bot: 1
token: XXX+\

Note: the updated baserevid

Screencast (for statement creation and removal):

Screencast (for a similar action, creating a statement then trying to add a reference):

Event Timeline

Restricted Application added a project: Wikidata. · View Herald TranscriptMay 10 2018, 9:16 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Addshore renamed this task from Creating a Lexeme statement and immediately removing it fails with "invalid claim guid" to WikibaseLexeme UI doesn't use updated baserevid once lexeme statement has been created.May 10 2018, 9:26 AM
Addshore updated the task description. (Show Details)
Addshore updated the task description. (Show Details)May 10 2018, 9:33 AM

Change 434482 had a related patch set uploaded (by Jakob; owner: Jakob):
[mediawiki/extensions/WikibaseLexeme@master] Fix LexemeRevisionStore::getClaimRevision for lexeme statements

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

Change 434482 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Fix LexemeRevisionStore::getClaimRevision for lexeme statements

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

@Lydia_Pintscher this should be fixed now. Can be tested on beta and wikidata-lexeme.wmflabs.org

Vvjjkkii renamed this task from WikibaseLexeme UI doesn't use updated baserevid once lexeme statement has been created to l8caaaaaaa.Jul 1 2018, 1:10 AM
Vvjjkkii reopened this task as Open.
Vvjjkkii removed Jakob_WMDE as the assignee of this task.
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii edited subscribers, added: Jakob_WMDE; removed: gerritbot, Aklapper.
CommunityTechBot renamed this task from l8caaaaaaa to WikibaseLexeme UI doesn't use updated baserevid once lexeme statement has been created.Jul 1 2018, 3:58 PM
CommunityTechBot closed this task as Resolved.
CommunityTechBot assigned this task to Jakob_WMDE.
CommunityTechBot raised the priority of this task from High to Needs Triage.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot edited subscribers, added: gerritbot, Aklapper; removed: Jakob_WMDE.