<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://noumenapedia.net/index.php?action=history&amp;feed=atom&amp;title=Template_talk%3AWikidata_check</id>
	<title>Template talk:Wikidata check - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://noumenapedia.net/index.php?action=history&amp;feed=atom&amp;title=Template_talk%3AWikidata_check"/>
	<link rel="alternate" type="text/html" href="https://noumenapedia.net/index.php?title=Template_talk:Wikidata_check&amp;action=history"/>
	<updated>2026-10-29T08:24:44Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://noumenapedia.net/index.php?title=Template_talk:Wikidata_check&amp;diff=29667&amp;oldid=prev</id>
		<title>Deleatur yhe: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://noumenapedia.net/index.php?title=Template_talk:Wikidata_check&amp;diff=29667&amp;oldid=prev"/>
		<updated>2026-09-20T17:02:11Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 17:02, 20 September 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Deleatur yhe</name></author>
	</entry>
	<entry>
		<id>https://noumenapedia.net/index.php?title=Template_talk:Wikidata_check&amp;diff=29666&amp;oldid=prev</id>
		<title>wikipedia&gt;Bb010g: /* Allow checking against Wikibase item values */ new section</title>
		<link rel="alternate" type="text/html" href="https://noumenapedia.net/index.php?title=Template_talk:Wikidata_check&amp;diff=29666&amp;oldid=prev"/>
		<updated>2026-07-15T18:03:10Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Allow checking against Wikibase item values: &lt;/span&gt; new section&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{WikiProject banner shell|&lt;br /&gt;
{{WikiProject Wikidata}}&lt;br /&gt;
}}&lt;br /&gt;
==Script errors==&lt;br /&gt;
{{moved from|Module talk:WikidataCheck|[[User:Pppery|&amp;amp;#123;&amp;amp;#123;3x&amp;amp;#124;p&amp;amp;#125;&amp;amp;#125;ery]] ([[User talk:Pppery|talk]])  20:59, 25 March 2019 (UTC)}}&lt;br /&gt;
This module has placed several pages in [[:Category:Pages with script errors]].  Please fix it.  [[User:Dragons flight|Dragons flight]] ([[User talk:Dragons flight|talk]]) 07:22, 20 May 2013 (UTC)&lt;br /&gt;
:{{fixed}} And next time, please see if the error is simple enough to fix yourself. -[[User:Happy5214|happy]][[User talk:Happy5214|5214]] 08:04, 20 May 2013 (UTC)&lt;br /&gt;
&lt;br /&gt;
== change mw.wikibase.getEntitiy (deprecated) to mw.wikibase.getEntityObject ==&lt;br /&gt;
{{moved from|Module talk:WikidataCheck|[[User:Pppery|&amp;amp;#123;&amp;amp;#123;3x&amp;amp;#124;p&amp;amp;#125;&amp;amp;#125;ery]] ([[User talk:Pppery|talk]])  20:59, 25 March 2019 (UTC)}}&lt;br /&gt;
{{edit semi-protected|Module:WikidataCheck|answered=yes}}&lt;br /&gt;
&amp;lt;!-- Begin request --&amp;gt;&lt;br /&gt;
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 [https://lists.wikimedia.org/pipermail/wikidata-l/2015-February/005450.html]. If you could change it on this module, that would be great! &lt;br /&gt;
Thank you a lot! --[[User:Lucie Kaffee (WMDE)|Lucie Kaffee (WMDE)]] ([[User talk:Lucie Kaffee (WMDE)|talk]]) 13:33, 2 March 2015 (UTC)&lt;br /&gt;
&amp;lt;!-- End request --&amp;gt;&lt;br /&gt;
[[User:Lucie Kaffee (WMDE)|Lucie Kaffee (WMDE)]] ([[User talk:Lucie Kaffee (WMDE)|talk]]) 13:33, 2 March 2015 (UTC)&lt;br /&gt;
:[[File:Red information icon with gradient background.svg|20px|link=]] &amp;#039;&amp;#039;&amp;#039;Not done:&amp;#039;&amp;#039;&amp;#039; please make your requested changes to the module&amp;#039;s sandbox first; see [[WP:TESTCASES]].&amp;lt;!-- Template:ESp --&amp;gt; — &amp;lt;code class=&amp;quot;nowrap&amp;quot;&amp;gt;&amp;amp;#123;&amp;amp;#123;U&amp;amp;#124;[[User:Technical 13|Technical 13]]&amp;amp;#125;&amp;amp;#125; &amp;lt;sup&amp;gt;([[Special:EmailUser/Technical 13|e]] • [[User talk:Technical 13|t]] • [[Special:Contribs/Technical 13|c]])&amp;lt;/sup&amp;gt;&amp;lt;/code&amp;gt; 15:55, 2 March 2015 (UTC)&lt;br /&gt;
::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. --[[User:Lucie Kaffee (WMDE)|Lucie Kaffee (WMDE)]] ([[User talk:Lucie Kaffee (WMDE)|talk]]) 15:06, 24 March 2015 (UTC)&lt;br /&gt;
:::[[File:Yes check.svg|18px|link=]] &amp;#039;&amp;#039;&amp;#039;Done&amp;#039;&amp;#039;&amp;#039;&amp;lt;!--template:done--&amp;gt;. Also {{u|Lucie Kaffee (WMDE)}}, if you make 1 more edit anywhere on en.wiki you&amp;#039;ll be able to edit semi-protected pages. [[User:Stickee|Stickee]] &amp;lt;small&amp;gt;[[User talk:Stickee|(talk)]]&amp;lt;/small&amp;gt; 00:26, 25 March 2015 (UTC)&lt;br /&gt;
&lt;br /&gt;
==Tracking categories==&lt;br /&gt;
{{moved from|Module talk:WikidataCheck|[[User:Pppery|&amp;amp;#123;&amp;amp;#123;3x&amp;amp;#124;p&amp;amp;#125;&amp;amp;#125;ery]] ([[User talk:Pppery|talk]])  20:59, 25 March 2019 (UTC)}}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Tracking categories currently work like this:&lt;br /&gt;
! Local param !! Wikidata property !! Tracking cat&lt;br /&gt;
|-&lt;br /&gt;
| exists || missing || Not in Wikidata&lt;br /&gt;
|-&lt;br /&gt;
| missing || exists || Different&lt;br /&gt;
|-&lt;br /&gt;
| exists || exists and different || Different&lt;br /&gt;
|-&lt;br /&gt;
| exists || exists and same || Same&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
...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 &amp;quot;same&amp;quot;, there is e.g. no need to delete the local param as redundant. I&amp;#039;d argue that in case #2 no tracking needs to be done. I believe this would make sense both for MusicBrainz and {{tl|Official website}} (I&amp;#039;d like to use WikidataCheck in the latter). [[User:GregorB|GregorB]] ([[User talk:GregorB|talk]]) 11:59, 1 April 2015 (UTC)&lt;br /&gt;
:Ping {{ping|Happy5214}} any opinion on the above? [[User:GregorB|GregorB]] ([[User talk:GregorB|talk]]) 15:32, 15 April 2015 (UTC)&lt;br /&gt;
:: I have implemented this. Better late than never, I guess. A missing local value is no longer categorized as different. —&amp;amp;thinsp;[[User:JJMC89|JJMC89]]&amp;amp;thinsp;&amp;lt;small&amp;gt;([[User talk:JJMC89|T]]&amp;#039;&amp;#039;&amp;#039;·&amp;#039;&amp;#039;&amp;#039;[[Special:Contributions/JJMC89|C]])&amp;lt;/small&amp;gt; 05:13, 1 October 2016 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Somevalue/novalue ==&lt;br /&gt;
{{moved from|Module talk:WikidataCheck|[[User:Pppery|&amp;amp;#123;&amp;amp;#123;3x&amp;amp;#124;p&amp;amp;#125;&amp;amp;#125;ery]] ([[User talk:Pppery|talk]])  20:59, 25 March 2019 (UTC)}}&lt;br /&gt;
{{ping|Happy5214}} the code should be upgraded for somevalue/novalue. That is, if the property is set to &amp;#039;novalue&amp;#039; or &amp;#039;somevalue&amp;#039;, then currently error is shown. You can take a look at [[Wikipedia:Wikidata/Wikidata Sandbox|sandbox]]: &amp;quot;Lua error in Module:WikidataCheck at line 31: attempt to index field &amp;#039;datavalue&amp;#039; (a nil value).&amp;quot;, and the value is set [[:d:Q4115189|here]] (currently the last one - IMDb identifier). Code sample is also in [[Module:Coordinates|coordinates module]] at {{code|makeWikidataCategories}}. --&amp;#039;&amp;#039;&amp;#039;[[User:Edgars2007|&amp;lt;span style=&amp;quot;color:#FF6600;&amp;quot;&amp;gt;Edgars2007&amp;lt;/span&amp;gt;]]&amp;#039;&amp;#039;&amp;#039; &amp;lt;small&amp;gt;([[User talk:Edgars2007|talk]]/[[Special:Contributions/Edgars2007|contribs]])&amp;lt;/small&amp;gt; 16:40, 11 December 2015 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Loop over all property values ==&lt;br /&gt;
{{moved from|Module talk:WikidataCheck|[[User:Pppery|&amp;amp;#123;&amp;amp;#123;3x&amp;amp;#124;p&amp;amp;#125;&amp;amp;#125;ery]] ([[User talk:Pppery|talk]])  20:59, 25 March 2019 (UTC)}}&lt;br /&gt;
I&amp;#039;d really appreciate if the code comment &amp;quot;This should eventually iterate over all possible values?&amp;quot; was implemented.  I guess I&amp;#039;ll eventually learn LUA if I have to, but if an expert is already able and willing, you&amp;#039;d have my gratitude. --[[User:99of9|99of9]] ([[User talk:99of9|talk]]) 04:48, 20 June 2017 (UTC)&lt;br /&gt;
{{edit protected|Module:WikidataCheck|answered=y}}&lt;br /&gt;
&amp;lt;!-- Begin request --&amp;gt;&lt;br /&gt;
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 [https://en.wikipedia.org/w/index.php?title=Template%3ACensus_2011_AUS&amp;amp;type=revision&amp;amp;diff=786559931&amp;amp;oldid=786557302 here], and the examples I tried seemed to work, so I have now reverted that to use the main module. --[[User:99of9|99of9]] ([[User talk:99of9|talk]]) 06:46, 20 June 2017 (UTC)&lt;br /&gt;
:{{Done}} --[[User:Canley|Canley]] ([[User talk:Canley|talk]]) 11:40, 20 June 2017 (UTC)&lt;br /&gt;
::Thanks very much. --[[User:99of9|99of9]] ([[User talk:99of9|talk]]) 13:18, 20 June 2017 (UTC)&lt;br /&gt;
:::There is an issue with: [[Special:Diff/786592438]]. Previously, if {{var|value}} was empty, pages would be categorized into a &amp;quot;not in Wikidata&amp;quot; category if there was no Wikidata for the page or if the linked Wikidata did not not have any claims matching {{var|property}}. With the change, the check for an empty {{var|value}} was moved up and pages with linked Wikidata but without claims matching {{var|property}} are no longer categorized into a &amp;quot;not in Wikidata&amp;quot; category (though it still does properly categorize when there is no linked Wikidata at all). [[Special:Contributions/50.53.1.21|50.53.1.21]] ([[User talk:50.53.1.21|talk]]) 00:40, 13 January 2018 (UTC)&lt;br /&gt;
:::Instead of filtering claims to match against {{var|value}} by just {{var|property}}, we should probably also filter by claims by rank as it probably does not make much sense to compare {{var|value}} to deprecated claims. The easiest way to do this is by using {{code|getBestStatements|lua}} with {{var|property}} instead of directly accessing {{code|claims[property]|lua}} from an entity object. [[Special:Contributions/50.53.1.21|50.53.1.21]] ([[User talk:50.53.1.21|talk]]) 00:40, 13 January 2018 (UTC)&lt;br /&gt;
:::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 {{code|getEntityObject|lua}} 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 [[mw:Extension:Wikibase Client/Lua#mw.wikibase.getBestStatements|getBestStatements]] or [[mw:Extension:Wikibase Client/Lua#mw.wikibase.getAllStatements|getAllStatements]] (with [[mw:Extension:Wikibase Client/Lua#mw.wikibase.getEntityIdForCurrentPage|getEntityIdForCurrentPage]]) over [[mw:Extension:Wikibase Client/Lua#mw.wikibase.entity:getBestStatements|entity:getBestStatements]], [[mw:Extension:Wikibase Client/Lua#mw.wikibase.entity:getAllStatements|entity:getAllStatements]] or [[mw:Extension:Wikibase Client/Lua#mw.wikibase.entity.claims|entity.claims]] (with [[mw:Extension:Wikibase Client/Lua#mw.wikibase.getEntity|getEntity]] or [[mw:Extension:Wikibase Client/Lua#mw.wikibase.getEntityObject|getEntityObject]]). [[Special:Contributions/50.53.1.21|50.53.1.21]] ([[User talk:50.53.1.21|talk]]) 00:40, 13 January 2018 (UTC)&lt;br /&gt;
{{edit template-protected|Module:WikidataCheck|answered=y}}&lt;br /&gt;
::::I addressed the above issues in the sandbox, however, I have not done any real testing of the changes. [[Special:Contributions/50.53.1.21|50.53.1.21]] ([[User talk:50.53.1.21|talk]]) 07:10, 13 January 2018 (UTC)&lt;br /&gt;
Thank you for your work but please do test it before using {{tl|edit template-protected}}. [[User:Happy5214]]: would you like to review these changes? &amp;amp;mdash;&amp;amp;nbsp;Martin &amp;lt;small&amp;gt;([[User:MSGJ|MSGJ]]&amp;amp;nbsp;·&amp;amp;nbsp;[[User talk:MSGJ|talk]])&amp;lt;/small&amp;gt; 09:37, 15 January 2018 (UTC)&lt;br /&gt;
:I no longer maintain this module. I&amp;#039;m probably of no help here. If you still need someone to look over it by this weekend, ping me again and I&amp;#039;ll try to look at it. -[[User:Happy5214|happy]][[User talk:Happy5214|5214]] 04:59, 17 January 2018 (UTC)&lt;br /&gt;
::{{ping|MSGJ|Happy5214|99of9}} Sadly there is no real good way for me to test this. It almost requires me to submit another {{tl|edit template-protected}} (or similar) to an existing template using this template/module to test it (and another to revert it back when the testing is complete). {{user|99of9}} did something similar in [[Special:Diff/786559931]] and [[Special:Diff/786560495]] (see above comments). If you have a better way to test such, I am all ears. [[Special:Contributions/50.53.1.21|50.53.1.21]] ([[User talk:50.53.1.21|talk]]) 19:28, 17 January 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Stray right bracket ==&lt;br /&gt;
{{moved from|Module talk:WikidataCheck|[[User:Pppery|&amp;amp;#123;&amp;amp;#123;3x&amp;amp;#124;p&amp;amp;#125;&amp;amp;#125;ery]] ([[User talk:Pppery|talk]])  20:59, 25 March 2019 (UTC)}}&lt;br /&gt;
Why is the invocation of this module [[special:permalink/851230955#Testing|HERE]] printing a stray &amp;#039;&amp;#039;&amp;#039;]&amp;#039;&amp;#039;&amp;#039; character? [[User:Wbm1058|wbm1058]] ([[User talk:Wbm1058|talk]]) 23:13, 20 July 2018 (UTC)&lt;br /&gt;
:{{ping|Wbm1058}} It has nothing to do with this module. The reference to [[:Category:People from Oakdale, California]] had an extra closing bracket. -[[User:Happy5214|happy]][[User talk:Happy5214|5214]] 23:46, 20 July 2018 (UTC)&lt;br /&gt;
::{{facepalm}} thanks! stuff like that isn&amp;#039;t easy to spot! [[User:Wbm1058|wbm1058]] ([[User talk:Wbm1058|talk]]) 23:49, 20 July 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Add catsort option ==&lt;br /&gt;
&lt;br /&gt;
Is it possible to add a catsort option (say parameter {{para|catsort}}) that, when having input, adds the catsort value? Sometimes I use maintenance categories this way: &amp;quot;when situation is A, catsort under pagename, when situation is B, catsort under &amp;#039;*&amp;#039;&amp;quot;. This way the category is dispersing softly. It also can be worked on for example to make the &amp;#039;*&amp;#039; subsort empty. -[[User:DePiep|DePiep]] ([[User talk:DePiep|talk]]) 13:47, 29 January 2017 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Custom qid ==&lt;br /&gt;
&lt;br /&gt;
I&amp;#039;ve got a version in the sandbox which accepts {{para|qid}} for arbitrary access to other Wikidata items. Seems to be working but I will test further. &amp;amp;mdash;&amp;amp;nbsp;Martin &amp;lt;small&amp;gt;([[User:MSGJ|MSGJ]]&amp;amp;nbsp;·&amp;amp;nbsp;[[User talk:MSGJ|talk]])&amp;lt;/small&amp;gt; 17:52, 17 June 2021 (UTC)&lt;br /&gt;
:{{added}} &amp;amp;mdash;&amp;amp;nbsp;Martin &amp;lt;small&amp;gt;([[User:MSGJ|MSGJ]]&amp;amp;nbsp;·&amp;amp;nbsp;[[User talk:MSGJ|talk]])&amp;lt;/small&amp;gt; 12:57, 18 June 2021 (UTC)&lt;br /&gt;
&lt;br /&gt;
== New functionality ==&lt;br /&gt;
&lt;br /&gt;
I&amp;#039;m not sure if anyone is maintaining this module, but I wanted to suggest that some extra functionality is added. I have coded this in [[Template:Wikidata alignment]] but it would be better added to this module I think.&lt;br /&gt;
&lt;br /&gt;
It shows visually (hidden by default) using 4 different icons ([[File:Gartoon actions button accept.svg|20px|Matches value on Wikidata|link=]] [[File:Gartoon actions help.svg|20px|Value missing on Wikidata|link=]] [[File:Gartoon actions messagebox warning.svg|20px|Does not match value on Wikidata|link=]] [[File:Gartoon actions button ok.svg|20px|Wikidata value used|link=]]), the comparison between the local value and Wikidata value. I&amp;#039;ve copied my example from the documentation page below.&lt;br /&gt;
&lt;br /&gt;
[[File:Infobox with withdata alignment example.png|right]]&lt;br /&gt;
This screenshot shows four fields in an infobox.&lt;br /&gt;
*The NGA number is defined locally but missing from Wikidata. A link to import this value via [[wikidata:Help:QuickStatements|QuickStatements]] is provided.&lt;br /&gt;
*The admiralty number is not defined locally, so the Wikidata value is used by default.&lt;br /&gt;
*The ARLHS number stored on Wikidata is slightly different to the local value. The Wikidata value is displayed in red alongside.&lt;br /&gt;
*The USCG number defined locally matches the local parameter.&lt;br /&gt;
&lt;br /&gt;
Does this look useful to add here? &amp;amp;mdash;&amp;amp;nbsp;Martin &amp;lt;small&amp;gt;([[User:MSGJ|MSGJ]]&amp;amp;nbsp;·&amp;amp;nbsp;[[User talk:MSGJ|talk]])&amp;lt;/small&amp;gt; 09:54, 24 September 2021 (UTC)&lt;br /&gt;
&lt;br /&gt;
:{{Agree}} I think this would be useful. I also think it&amp;#039;d be useful to factor the &amp;lt;code&amp;gt;&amp;amp;lt;span class=&amp;quot;showwd&amp;quot;&amp;amp;gt;&amp;lt;/code&amp;gt; bits out into templates that don&amp;#039;t query Wikidata. (I don&amp;#039;t like duplicating the QuickStatements URL code.) [[User:Bb010g|bb010g]] ([[User talk:Bb010g|talk]]) 17:52, 15 July 2026 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Case-sensitivity and other stylistic differences ==&lt;br /&gt;
&lt;br /&gt;
Thank you for building this module. It&amp;#039;s a great help for comparing Wikidata and English Wikipedia data to find issues. @[[User:Mike Peel|Mike Peel]] is using the results to feed the Mismatch Finder, which is a tool for easier reviewing of mismatches between Wikidata and other data sources. When reviewing mismatches in the Mismatch Finder I am coming across quite a few differences that I think are not really issues that should be flagged. I was wondering if the module could be amended to ignore some of those differences. You can try it yourself by going to https://mismatch-finder.toolforge.org and clicking the &amp;quot;random mismatches&amp;quot; button to see a few of the things that come up.&lt;br /&gt;
&lt;br /&gt;
Here are some example of things that I think should not be flagged as different:&lt;br /&gt;
* Twitter user name that only differs in capitalization&lt;br /&gt;
* IMDB ID where Wikidata has a convention of keeping the &amp;quot;tt&amp;quot; in the identifier and enwp doesn&amp;#039;t&lt;br /&gt;
* Open Library ID where Wikidata keeps the &amp;quot;OL&amp;quot; in the identifier but enwp doesn&amp;#039;t&lt;br /&gt;
[[User:LydiaPintscher|LydiaPintscher]] ([[User talk:LydiaPintscher|talk]]) 15:03, 7 September 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
:This is similar to what I was using in [[Template:Wikidata alignment]] with the &amp;quot;equivalent&amp;quot; parameter. I think the functionality could be merged into this template if it looks okay. Johnuniq did express reservations on the talk page though &amp;amp;mdash;&amp;amp;nbsp;Martin &amp;lt;small&amp;gt;([[User:MSGJ|MSGJ]]&amp;amp;nbsp;·&amp;amp;nbsp;[[User talk:MSGJ|talk]])&amp;lt;/small&amp;gt; 16:01, 7 September 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: The module already has an option to ignore case, which I added in July. It was implemented in [[Template:Twitter]] and others; a full list may be found [https://en.wikipedia.org/w/index.php?search=insource%3A%2Fwikidatacheck%2Fi+insource%3A%2Fignorecase%2F&amp;amp;title=Special:Search&amp;amp;profile=advanced&amp;amp;fulltext=1&amp;amp;ns10=1 here]. -- [[User:Zyxw|Zyxw]] ([[User talk:Zyxw|talk]]) 06:46, 1 December 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Checking sourced properties only? ==&lt;br /&gt;
&lt;br /&gt;
I recently added {{tl|WikidataCheck}} to {{tl|Infobox network service provider}}, which uses {{tl|wdib}} (with {{para|osd|yes}}) rather than &amp;lt;code&amp;gt;{{#property}}&amp;lt;/code&amp;gt; [[Template talk:Infobox network service provider#Wikidata not being checked for references|in order to comply with a 2018 RFC requiring Wikidata-imported infobox data to be sourced]].  {{tl|WikidataCheck}} seems to be checking against *all* Wikidata properties, not just sourced ones.  Is there any appetite for adding a source check similar to [[Module:WikidataIB]]&amp;#039;s?&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- sourced takes a table representing a statement that may or may not have references&lt;br /&gt;
-- it looks for a reference sourced to something not containing the word &amp;quot;wikipedia&amp;quot;&lt;br /&gt;
-- it returns a boolean = true if it finds a sourced reference.&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
-- Dependencies: none&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
local sourced = function(claim)&lt;br /&gt;
	if claim.references then&lt;br /&gt;
		for kr, vr in pairs(claim.references) do&lt;br /&gt;
			local ref = mw.wikibase.renderSnaks(vr.snaks)&lt;br /&gt;
			if not ref:find(&amp;quot;Wiki&amp;quot;) then&lt;br /&gt;
				return true&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[User:DefaultFree|DefaultFree]] ([[User talk:DefaultFree|talk]]) 22:08, 20 November 2023 (UTC)&lt;br /&gt;
:Proposal:&lt;br /&gt;
{{cot|title=collapsed original diff}}&lt;br /&gt;
{{TextDiff|&amp;lt;nowiki&amp;gt;local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.wikidatacheck(frame)&lt;br /&gt;
	local pframe = frame:getParent()&lt;br /&gt;
	local config = frame.args -- the arguments passed BY the template, in the wikitext of the template itself&lt;br /&gt;
	local args = pframe.args -- the arguments passed TO the template, in the wikitext that transcludes the template&lt;br /&gt;
&lt;br /&gt;
	local property = config.property&lt;br /&gt;
	local value = config.value or &amp;quot;&amp;quot;&lt;br /&gt;
	local catbase = config.category&lt;br /&gt;
	local namespaces = config.namespaces&lt;br /&gt;
	local nocatsame = config.nocatsame or &amp;quot;&amp;quot;&lt;br /&gt;
	local ignorecase = config.ignorecase or &amp;quot;&amp;quot;&lt;br /&gt;
	local qid = config.qid or &amp;quot;&amp;quot;&lt;br /&gt;
	local ok = false -- one-way flag to check if we&amp;#039;re in a good namespace&lt;br /&gt;
	local ns = mw.title.getCurrentTitle().namespace&lt;br /&gt;
	&lt;br /&gt;
	for v in mw.text.gsplit( namespaces, &amp;quot;,&amp;quot;, true) do&lt;br /&gt;
		if tonumber(v) == ns then&lt;br /&gt;
			ok = true&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if not ok then -- not in one of the approved namespaces&lt;br /&gt;
		return &amp;quot;&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	local entity&lt;br /&gt;
	if qid == &amp;quot;&amp;quot; then&lt;br /&gt;
		entity = mw.wikibase.getEntityObject()&lt;br /&gt;
	else&lt;br /&gt;
		entity = mw.wikibase.getEntityObject(qid)&lt;br /&gt;
	end&lt;br /&gt;
	if not entity then -- no Wikidata item&lt;br /&gt;
		return &amp;quot;[[Category:&amp;quot; .. catbase .. &amp;quot; not in Wikidata]]&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	if value == &amp;quot;&amp;quot; then&lt;br /&gt;
		return nil -- Using Wikidata&lt;br /&gt;
	end&lt;br /&gt;
	local claims = entity.claims or {}&lt;br /&gt;
	local hasProp = claims[property]&lt;br /&gt;
	if not hasProp then -- no claim of that property&lt;br /&gt;
		return &amp;quot;[[Category:&amp;quot; .. catbase .. &amp;quot; not in Wikidata]]&amp;quot; -- bad. Bot needs to add the property&lt;br /&gt;
	end&lt;br /&gt;
	if ignorecase ~= &amp;quot;&amp;quot; then&lt;br /&gt;
		value = string.lower( value )&lt;br /&gt;
	end&lt;br /&gt;
	for i, v in ipairs(hasProp) do -- Now we try to iterate over all possible values?&lt;br /&gt;
		propValue = (v.mainsnak.datavalue or {}).value&lt;br /&gt;
		if ignorecase ~= &amp;quot;&amp;quot; then&lt;br /&gt;
			propValue = string.lower( propValue )&lt;br /&gt;
		end&lt;br /&gt;
		if propValue == value then&lt;br /&gt;
			if nocatsame == &amp;quot;&amp;quot; then&lt;br /&gt;
				return &amp;quot;[[Category:&amp;quot; .. catbase .. &amp;quot; same as Wikidata]]&amp;quot; -- yay!&lt;br /&gt;
			else&lt;br /&gt;
				return nil -- if nocatsame, the &amp;quot;same as&amp;quot; category is not added&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return &amp;quot;[[Category:&amp;quot; .. catbase .. &amp;quot; different from Wikidata]]&amp;quot; -- needs human review :(&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&amp;lt;/nowiki&amp;gt;|&amp;lt;nowiki&amp;gt;local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.wikidatacheck(frame)&lt;br /&gt;
	local pframe = frame:getParent()&lt;br /&gt;
	local config = frame.args -- the arguments passed BY the template, in the wikitext of the template itself&lt;br /&gt;
	local args = pframe.args -- the arguments passed TO the template, in the wikitext that transcludes the template&lt;br /&gt;
&lt;br /&gt;
	local property = config.property&lt;br /&gt;
	local value = config.value or &amp;quot;&amp;quot;&lt;br /&gt;
	local catbase = config.category&lt;br /&gt;
	local namespaces = config.namespaces&lt;br /&gt;
	local nocatsame = config.nocatsame or &amp;quot;&amp;quot;&lt;br /&gt;
	local ignorecase = config.ignorecase or &amp;quot;&amp;quot;&lt;br /&gt;
	local qid = config.qid or &amp;quot;&amp;quot;&lt;br /&gt;
	local onlysourced = config.onlysourced or false&lt;br /&gt;
	local ok = false -- one-way flag to check if we&amp;#039;re in a good namespace&lt;br /&gt;
	local ns = mw.title.getCurrentTitle().namespace&lt;br /&gt;
	&lt;br /&gt;
	for v in mw.text.gsplit( namespaces, &amp;quot;,&amp;quot;, true) do&lt;br /&gt;
		if tonumber(v) == ns then&lt;br /&gt;
			ok = true&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if not ok then -- not in one of the approved namespaces&lt;br /&gt;
		return &amp;quot;&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	local entity&lt;br /&gt;
	if qid == &amp;quot;&amp;quot; then&lt;br /&gt;
		entity = mw.wikibase.getEntityObject()&lt;br /&gt;
	else&lt;br /&gt;
		entity = mw.wikibase.getEntityObject(qid)&lt;br /&gt;
	end&lt;br /&gt;
	if not entity then -- no Wikidata item&lt;br /&gt;
		return &amp;quot;[[Category:&amp;quot; .. catbase .. &amp;quot; not in Wikidata]]&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	if value == &amp;quot;&amp;quot; then&lt;br /&gt;
		return nil -- Using Wikidata&lt;br /&gt;
	end&lt;br /&gt;
	local claims = entity.claims or {}&lt;br /&gt;
	local hasProp = claims[property]&lt;br /&gt;
	if not hasProp then -- no claim of that property&lt;br /&gt;
		return &amp;quot;[[Category:&amp;quot; .. catbase .. &amp;quot; not in Wikidata]]&amp;quot; -- bad. Bot needs to add the property&lt;br /&gt;
	end&lt;br /&gt;
	if ignorecase ~= &amp;quot;&amp;quot; then&lt;br /&gt;
		value = string.lower( value )&lt;br /&gt;
	end&lt;br /&gt;
	for i, v in ipairs(hasProp) do -- Now we try to iterate over all possible values?&lt;br /&gt;
		propValue = (v.mainsnak.datavalue or {}).value&lt;br /&gt;
		if ignorecase ~= &amp;quot;&amp;quot; then&lt;br /&gt;
			propValue = string.lower( propValue )&lt;br /&gt;
		end&lt;br /&gt;
		local sourced = false -- check for external refs a la Module:WikidataIB onlysourced&lt;br /&gt;
		for j, vr in ipairs(v.references) do&lt;br /&gt;
			local ref = mw.wikibase.renderSnaks(vr.snaks)&lt;br /&gt;
			if not ref:find(&amp;quot;Wiki&amp;quot;) then&lt;br /&gt;
				sourced = true&lt;br /&gt;
				break&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		if propValue == value and (not onlysourced or sourced) then&lt;br /&gt;
			if nocatsame == &amp;quot;&amp;quot; then&lt;br /&gt;
				return &amp;quot;[[Category:&amp;quot; .. catbase .. &amp;quot; same as Wikidata]]&amp;quot; -- yay!&lt;br /&gt;
			else&lt;br /&gt;
				return nil -- if nocatsame, the &amp;quot;same as&amp;quot; category is not added&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return &amp;quot;[[Category:&amp;quot; .. catbase .. &amp;quot; different from Wikidata]]&amp;quot; -- needs human review :(&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
{{cob}}&lt;br /&gt;
:Caveat: not entirely sure how best to test this (there doesn&amp;#039;t seem to be a /testcases subpage), and I haven&amp;#039;t written MediaWiki-lua before, so bugs are not unlikely.  [[User:DefaultFree|DefaultFree]] ([[User talk:DefaultFree|talk]]) 05:30, 21 November 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
{{Edit template-protected|Module:WikidataCheck|Template:WikidataCheck|answered=yes}}&lt;br /&gt;
In the absence of any negative feedback, I&amp;#039;ve gone ahead and implemented this in the sandbox.  To test, I switched {{tl|Infobox network service provider}} from {{tl|WikidataCheck}} to {{tlx|WikidataCheck/sandbox|onlysourced{{=}}yes}}, and it seems to have updated categorizations as expected - now the categories are much more actionable for making corrections to data.&lt;br /&gt;
Could someone review these diffs and apply them?&lt;br /&gt;
*[https://en.wikipedia.org/wiki/Special:ComparePages?page1=Module%3AWikidataCheck&amp;amp;rev1=1167485428&amp;amp;page2=Module%3AWikidataCheck%2Fsandbox&amp;amp;rev2=1187414360&amp;amp;action=&amp;amp;unhide= module]&lt;br /&gt;
*[https://en.wikipedia.org/wiki/Special:ComparePages?page1=Template%3AWikidataCheck&amp;amp;rev1=1167485553&amp;amp;page2=Template%3AWikidataCheck%2Fsandbox&amp;amp;rev2=1187413897&amp;amp;action=&amp;amp;unhide= template]&lt;br /&gt;
Thanks! [[User:DefaultFree|DefaultFree]] ([[User talk:DefaultFree|talk]]) 03:06, 29 November 2023 (UTC)&lt;br /&gt;
: {{Done}} [[User:Pppery|* Pppery *]] [[User talk:Pppery|&amp;lt;sub style=&amp;quot;color:#800000&amp;quot;&amp;gt;it has begun...&amp;lt;/sub&amp;gt;]] 01:21, 30 November 2023 (UTC)&lt;br /&gt;
:: {{reply|DefaultFree|Pppery}} This change is populating many of the subcategories of {{cl|Wikipedia categories tracking Wikidata differences}}. For an example, see the article for [[Robert Conrad]] which is now in {{cl|The Interviews name ID different from Wikidata}}, even though both {{tl|The Interviews name}} and {{wpl|P5773}} contain the same ID. This appears to be occurring with all unsourced properties. I think the update to [[Module:WikidataCheck]] should be reverted until this can be fixed in [[Module:WikidataCheck/sandbox]]. -- [[User:Zyxw|Zyxw]] ([[User talk:Zyxw|talk]]) 10:26, 30 November 2023 (UTC)&lt;br /&gt;
:::Thanks for pointing this out, and apologies for introducing a bug.  It turns out Lua treats the empty string as truthy, causing this new logic to apply in all cases, not just when requested with {{para|onlysourced|yes}}.  I&amp;#039;m not able to edit the non-sandbox module, but I believe this should fix it: {{diff2|1187617872}} [[User:DefaultFree|DefaultFree]] ([[User talk:DefaultFree|talk]]) 10:37, 30 November 2023 (UTC)&lt;br /&gt;
::::Thanks. I tested your change in [[Module:WikidataCheck/sandbox]] with four different templates and it appears to solve the problem, so I am going to add it in [[Module:WikidataCheck]]. -- [[User:Zyxw|Zyxw]] ([[User talk:Zyxw|talk]]) 11:25, 30 November 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Allow checking against Wikibase item values ==&lt;br /&gt;
&lt;br /&gt;
If a property&amp;#039;s value is a Wikibase item, claim mainsnak data ends up following the form of&lt;br /&gt;
{{syntaxhighlight|lang=lua|code=&amp;lt;nowiki&amp;gt;datavalue = { type = &amp;quot;wikibase-entityid&amp;quot;, value = { [&amp;quot;entity-type&amp;quot;] = &amp;quot;item&amp;quot;, id = &amp;quot;Q29654788&amp;quot;, [&amp;quot;numeric-id&amp;quot;] = 29654788 } }&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
which means that, given &amp;lt;code&amp;gt;propValue = (v.mainsnak.datavalue or {}).value&amp;lt;/code&amp;gt;, an attempted &amp;lt;code&amp;gt;propValue == value&amp;lt;/code&amp;gt; comparison against a QID value will end up evaluating &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{ [&amp;quot;entity-type&amp;quot;] = &amp;quot;item&amp;quot;, id = &amp;quot;Q29654788&amp;quot;, [&amp;quot;numeric-id&amp;quot;] = 29654788 } == &amp;quot;Q29654788&amp;quot;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, which will always fail. I would appreciate some way to (explicitly) let my comparison value be a Wikibase item, so some of these comparisons may succeed. [[User:Bb010g|bb010g]] ([[User talk:Bb010g|talk]]) 18:03, 15 July 2026 (UTC)&lt;/div&gt;</summary>
		<author><name>wikipedia&gt;Bb010g</name></author>
	</entry>
</feed>