Module talk:WikidataCheck
![]() | Wikidata | |||
|
Script errors
This module has placed several pages in Category:Pages with script errors. Please fix it. Dragons flight (talk) 07:22, 20 May 2013 (UTC)
Fixed And next time, please see if the error is simple enough to fix yourself. -happy5214 08:04, 20 May 2013 (UTC)
change mw.wikibase.getEntitiy (deprecated) to mw.wikibase.getEntityObject
![]() | This edit request has been answered. Set the |answered= parameter to no to reactivate your request. |
I am trying to change all important modules using mw.wikibase.getEntity() which is deprecated to mw.wikibase.getEntityObject(). You can find more details here [1]. If you could change it on this module, that would be great! Thank you a lot! --Lucie Kaffee (WMDE) (talk) 13:33, 2 March 2015 (UTC) Lucie Kaffee (WMDE) (talk) 13:33, 2 March 2015 (UTC)
Not done: please make your requested changes to the module's sandbox first; see WP:TESTCASES. —
{{U|Technical 13}} (e • t • c)
15:55, 2 March 2015 (UTC)- I did. Please check Module:WikidataCheck/sandbox. mw.wikibase.getEntity() will be changed in a not backwards compatible way in two weeks, so it would be great to implement the changes before that. --Lucie Kaffee (WMDE) (talk) 15:06, 24 March 2015 (UTC)
Done. Also Lucie Kaffee (WMDE), if you make 1 more edit anywhere on en.wiki you'll be able to edit semi-protected pages. Stickee (talk) 00:26, 25 March 2015 (UTC)
- I did. Please check Module:WikidataCheck/sandbox. mw.wikibase.getEntity() will be changed in a not backwards compatible way in two weeks, so it would be great to implement the changes before that. --Lucie Kaffee (WMDE) (talk) 15:06, 24 March 2015 (UTC)
Tracking categories
Local param | Wikidata property | Tracking cat |
---|---|---|
exists | missing | Not in Wikidata |
missing | exists | Different |
exists | exists and different | Different |
exists | exists and same | Same |
...but row #2 is not (necessarily?) right: missing local param is a normal thing, this means that the value has been migrated to Wikidata, and no human review is needed (unlike row #3). If, on the other hand, one attempts to work around this by falling back to Wikidata property if local param is missing - like MusicBrainz templates do - then #2 becomes #4, which is again not right - the values are not really the "same", there is e.g. no need to delete the local param as redundant. I'd argue that in case #2 no tracking needs to be done. I believe this would make sense both for MusicBrainz and {{Official website}} (I'd like to use WikidataCheck in the latter). GregorB (talk) 11:59, 1 April 2015 (UTC)
- Ping @Happy5214: any opinion on the above? GregorB (talk) 15:32, 15 April 2015 (UTC)
- I have implemented this. Better late than never, I guess. A missing local value is no longer categorized as different. — JJMC89 (T·C) 05:13, 1 October 2016 (UTC)
Somevalue/novalue
@Happy5214: the code should be upgraded for somevalue/novalue. That is, if the property is set to 'novalue' or 'somevalue', then currently error is shown. You can take a look at sandbox: "Lua error in Module:WikidataCheck at line 31: attempt to index field 'datavalue' (a nil value).", and the value is set here (currently the last one - IMDb identifier). Code sample is also in coordinates module at makeWikidataCategories
. --Edgars2007 (talk/contribs) 16:40, 11 December 2015 (UTC)
Loop over all property values
I'd really appreciate if the code comment "This should eventually iterate over all possible values?" was implemented. I guess I'll eventually learn LUA if I have to, but if an expert is already able and willing, you'd have my gratitude. --99of9 (talk) 04:48, 20 June 2017 (UTC)
![]() | This edit request has been answered. Set the |answered= parameter to no to reactivate your request. |
I have figured out how to do the above request, and implemented it in the Module:WikidataCheck/sandbox. If it looks ok, please copy the sandbox code into the main template. I have tested this by running the sandbox code here, and the examples I tried seemed to work, so I have now reverted that to use the main module. --99of9 (talk) 06:46, 20 June 2017 (UTC)
Done --Canley (talk) 11:40, 20 June 2017 (UTC)
- Thanks very much. --99of9 (talk) 13:18, 20 June 2017 (UTC)
- There is an issue with: Special:Diff/786592438. Previously, if value was empty, pages would be categorized into a "not in Wikidata" category if there was no Wikidata for the page or if the linked Wikidata did not not have any claims matching property. With the change, the check for an empty value was moved up and pages with linked Wikidata but without claims matching property are no longer categorized into a "not in Wikidata" category (though it still does properly categorize when there is no linked Wikidata at all). 50.53.1.21 (talk) 00:40, 13 January 2018 (UTC)
- Instead of filtering claims to match against value by just property, we should probably also filter by claims by rank as it probably does not make much sense to compare value to deprecated claims. The easiest way to do this is by using
getBestStatements
with property instead of directly accessingclaims[property]
from an entity object. 50.53.1.21 (talk) 00:40, 13 January 2018 (UTC) - Another thing to consider is whether page cache entry should get purged when the linked Wikidata entry is updated (some related discussion at Template talk:Authority control/Archive 6#Technical improvement). Currently the code uses
getEntityObject
which binds Wikidata entry updates to the linked page caching. Since this code only attempts to check data, I believe we should avoid such (presumably the same Wikidata values will get used elsewhere in the template/module code and that probably in general should bind such changes) by using getBestStatements or getAllStatements (with getEntityIdForCurrentPage) over entity:getBestStatements, entity:getAllStatements or entity.claims (with getEntity or getEntityObject). 50.53.1.21 (talk) 00:40, 13 January 2018 (UTC)
- Thanks very much. --99of9 (talk) 13:18, 20 June 2017 (UTC)
![]() | This edit request has been answered. Set the |answered= parameter to no to reactivate your request. |
- I addressed the above issues in the sandbox, however, I have not done any real testing of the changes. 50.53.1.21 (talk) 07:10, 13 January 2018 (UTC)
Thank you for your work but please do test it before using {{edit template-protected}}. User:Happy5214: would you like to review these changes? — Martin (MSGJ · talk) 09:37, 15 January 2018 (UTC)
- I no longer maintain this module. I'm probably of no help here. If you still need someone to look over it by this weekend, ping me again and I'll try to look at it. -happy5214 04:59, 17 January 2018 (UTC)