Last modified: 2013-12-03 11:47:55 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T57835, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 55835 - wbsetreference api makes new references when a hash is provided
wbsetreference api makes new references when a hash is provided
Status: RESOLVED WORKSFORME
Product: MediaWiki extensions
Classification: Unclassified
WikidataRepo (Other open bugs)
master
All All
: High major (vote)
: ---
Assigned To: Wikidata bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-17 09:46 UTC by Addshore
Modified: 2013-12-03 11:47 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Addshore 2013-10-17 09:46:21 UTC
https://www.wikidata.org/wiki/Wikidata:Contact_the_development_team#.E2.80.8EChanged_reference_of_claim

although this call has also worked https://www.wikidata.org/w/index.php?title=Q2511165&diff=prev&oldid=77750477

wbsetreference should check if a reference exists with the given hash, if it doesn't find said reference it should ERROR to the user saying no such hash (you cant set a reference to a value if it doesn't exist)

New references should only be created when no reference hash is passed to the api.
Comment 1 Henning 2013-10-28 12:07:24 UTC
Unable to reproduce - neither with additional PHP Unit tests for ChangeOpReference nor by manually trying to set a reference with an invalid hash. Maybe the API call provided at https://www.wikidata.org/wiki/Wikidata:Contact_the_development_team/Archive/2013/10#.E2.80.8EChanged_reference_of_claim is not the one that caused the error (Quote: "I called wbsetreference with something like [...]"). Both, SetReference and ChangeOpReference check if there already is a reference with the provided hash (see SetReference::validateReferenceHash and ChangeOpReference::setReference).

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links