Last modified: 2014-10-15 20:42:22 UTC
Just discovered this weird issue: if you search for the label of a deleted property, it is still found. I've deleted the property with the label "AuWKYzfw", see http://wikidata.beta.wmflabs.org/w/index.php?title=Property:P2345&action=edit&redlink=1 But it can still be found by doing: http://wikidata.beta.wmflabs.org/w/api.php?action=wbsearchentities&format=json&search=AuWKYzfw&language=en&type=property&limit=10 This also means it can still be selected when adding statements as the property suggester uses wbsearchentities.
This does not apply to items: http://wikidata.beta.wmflabs.org/w/api.php?action=wbsearchentities&format=json&search=kuzTrkkK&language=en&type=item&limit=10 Above query does not give you any search results which is correct because the item was deleted.
You also cannot create a new property with the same label the deleted one had. Special:NewProperty also gives you a strange error message in case you try: Property P2345 already has label "AuWKYzfw" associated with language code en. Property P2345 already has label "ZTMfXXavmfzRtmdtGGAH" associated with language code en. So P2345 has two labels for language en associated? The second one should be the description.
(In reply to tobias.gritschacher from comment #2) > You also cannot create a new property with the same label the deleted one > had. Special:NewProperty also gives you a strange error message in case you > try: > > Property P2345 already has label "AuWKYzfw" associated with language code en. > Property P2345 already has label "ZTMfXXavmfzRtmdtGGAH" associated with > language code en. > > So P2345 has two labels for language en associated? The second one should be > the description. This seems unrelated, created another bug for it: https://bugzilla.wikimedia.org/show_bug.cgi?id=71915
(In reply to tobias.gritschacher from comment #0) > Just discovered this weird issue: > if you search for the label of a deleted property, it is still found. > I've deleted the property with the label "AuWKYzfw", see > http://wikidata.beta.wmflabs.org/w/index.php?title=Property: > P2345&action=edit&redlink=1 > > But it can still be found by doing: > http://wikidata.beta.wmflabs.org/w/api. > php?action=wbsearchentities&format=json&search=AuWKYzfw&language=en&type=prop > erty&limit=10 > > This also means it can still be selected when adding statements as the > property suggester uses wbsearchentities. The possible cause of the issue is outlined here: https://bugzilla.wikimedia.org/show_bug.cgi?id=71784 >>It seems like entries in the terms table are not removed when deleting entities. On test.wikidata.org, I created a property called "role" and then deleted it. However, "role" is still shown as a siggestion in the entity selector, and i cannot create a new property with the label "role".<<
*** Bug 71784 has been marked as a duplicate of this bug. ***
Change 166425 had a related patch set uploaded by Daniel Kinzler: Fix entity deletion updates for properties. https://gerrit.wikimedia.org/r/166425
Change 166425 merged by jenkins-bot: Fix entity deletion updates for properties. https://gerrit.wikimedia.org/r/166425
Patch merged... not sure how to deal with the old data still in the table? Worth cleaning that up per hand?
Would be good to delete the orphan entries, yes. Note that similar orphans are probably present in the entity_per_page table.
I've no manually purged both the orphan entity per page and the orphan terms table entries. Would be nice to have a maintenance script for that (but not really worth the work atm).