Page MenuHomePhabricator

Adding a claim to a redirected item throws a incorrect wikibase-validator-no-such-entity error message
Open, LowPublic


I tried to add a claim on Q22010361 ( to , but turns out it was redirected. modification-failed: [[Q21345747|Q21345747]] not found [messages:[{u'html': {u'*': u'<a href="/wiki/Q21345747" title="Q21345747" class="mw-redirect">Q21345747</a> not found'}, u'name': u'wikibase-validator-no-such-entity', u'parameters': [u'[[Q21345747|Q21345747]]']}]; help:See for API usage]

The error message is incorrect. The entity at exists, it's just a redirect. Correct behaviour would be either:

  • Just accept it and add the target item (bit like how you get redirected when you open
  • Throw an error that I'm trying to make a claim with a redirect as target (preferable with the Q id of the target so it's easy to recover)

I would of course prefer option 1.

Event Timeline

Multichill updated the task description. (Show Details)
Multichill raised the priority of this task from to Needs Triage.
Multichill added a subscriber: Multichill.
Restricted Application added subscribers: StudiesWorld, Aklapper. · View Herald TranscriptJan 10 2016, 10:55 PM
hoo added a comment.Jan 11 2016, 8:00 PM

Related to option #1: T122357. For consistency reasons, I think we should go with the second approach.

Thinking about this. Adding a claim to a redirect isn't technically incorrect so it maybe should just be accepted.

Could we add a statement with the redirect and give a warning? Or add a statement with the redirect target and give a warning?

It seems to me that to keep the database in good shape and reduce edits fixing redirects we should resolve the redirect.

Addshore added a comment.EditedJan 21 2016, 1:54 PM

So per
This issue will happen with entityIds in any part of any JSON!
This includes using wbeditentity

Lydia_Pintscher moved this task from incoming to ready to go on the Wikidata board.Feb 7 2018, 3:54 PM
Lydia_Pintscher triaged this task as Low priority.
Restricted Application added a subscriber: pywikibot-bugs-list. · View Herald TranscriptJun 19 2018, 9:04 AM