Module talk:Wd/Archive 1: Difference between revisions

Content deleted Content added
m Archiving 1 discussion(s) from Module talk:Wd) (bot
m Archiving 1 discussion(s) from Module talk:Wd) (bot
 
(30 intermediate revisions by 2 users not shown)
Line 603:
{{reflist-talk}}
Note especially the "author name string" spelled out. No human would produce a citation like that. I with {{tlx|wikidata|references}} would produce this kind of citation:
{{demo|<nowiki>{{citecitation |author=Lukasiwicz |date=25 December 2013 |title=What happened to Wikifonia? |url=https://www.saxontheweb.net/threads/what-happened-to-wikifonia.198166/post-2154479 |access-date=1 December 2020}} ''Additional parameters here''</nowiki>}}
[[User:Daask|Daask]] ([[User talk:Daask|talk]]) 14:55, 2 December 2020 (UTC)
:I did not know of the existence of {{wpl|P2093}} until now, I will take it into account in the upcoming update. [[User:Thayts|<span style="color:#466383;font-family:Georgia;font-style:italic;letter-spacing:1px">Thayts</span>]]&nbsp;[[User talk:Thayts|<span style="color:#7892A5">•••</span>]] 19:35, 2 December 2020 (UTC)
Line 1,263:
:::: Looks like you satisfy 3 to me: Per [https://xtools.wmcloud.org/ec/en.wikipedia.org/Janhrach edit counter tools], 135 module edits + 18 template edits = 153 total edits. I agree that you're technically 1 sandbox short of 5. [[User:Pppery|* Pppery *]] [[User talk:Pppery|<sub style="color:#800000">it has begun...</sub>]] 19:49, 10 July 2023 (UTC)
:::::{{ping|Pppery}} Oh, thank you for noticing that, I didn't to look at the template namespace, because I mistakenly thought my edit count there is negligible. [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 12:45, 11 July 2023 (UTC)
 
== Thousands of broken references ==
 
Looking at [https://en.wikipedia.org/w/index.php?limit=500&offset=0&profile=default&search=%22Error%3A+Unable+to+display+the+reference+properly.+See+the+documentation+for+details%22&title=Special:Search&ns0=1 this search] there appears to be thousands of articles with reference errors resulting from imports from Wikidata. Is there any category tracking these errors or anyone attempting to fix the underlying issue? -- LCU '''[[User:ActivelyDisinterested|ActivelyDisinterested]]''' <small>''∆[[User talk:ActivelyDisinterested|transmissions]]∆'' °[[Special:Contributions/ActivelyDisinterested|co-ords]]°</small> 13:11, 23 June 2023 (UTC)
 
:@[[User:ActivelyDisinterested|ActivelyDisinterested]], I've tried <nowiki>{{#invoke:wd|reference|raw|Q43148|P8843|P585=2000}}</nowiki>→{{#invoke:wd|reference|raw|Q43148|P8843|P585=2000}} It was missing a title on wikidata. Year 2003 is *still* without a title (here: {{Q|Q43148}}), so <nowiki>{{#invoke:wd|reference|raw|Q43148|P8843|P585=2003}}</nowiki>→{{#invoke:wd|reference|raw|Q43148|P8843|P585=2003}} [[User:Ponor|Ponor]] ([[User talk:Ponor|talk]]) 14:08, 23 June 2023 (UTC)
::Thanks but that's not what I'm asking. There are thousands of these, I'm wondering if that is being tracked. -- LCU '''[[User:ActivelyDisinterested|ActivelyDisinterested]]''' <small>''∆[[User talk:ActivelyDisinterested|transmissions]]∆'' °[[Special:Contributions/ActivelyDisinterested|co-ords]]°</small> 14:22, 23 June 2023 (UTC)
:::There is, apparently, no tracking in this module. We could add a category link, perhaps {{cl|Module:Wd reference errors}} or some such, to the error message at [[Special:Permalink/1153479440#L-14|Module:Wd/i18n line 14]]. Is there a better category name?
:::—[[User:Trappist the monk|Trappist the monk]] ([[User talk:Trappist the monk|talk]]) 14:44, 23 June 2023 (UTC)
::::"Module:Wd reference errors" would be fine, but "Wikidata reference errors" could be more obvious. Also is there anyway to make the error more prominent? The more obvious the error the more motivated people are to fix them. At the moment the error in down in the reference section, but could it be displayed instead of footnote number? -- LCU '''[[User:ActivelyDisinterested|ActivelyDisinterested]]''' <small>''∆[[User talk:ActivelyDisinterested|transmissions]]∆'' °[[Special:Contributions/ActivelyDisinterested|co-ords]]°</small> 15:14, 23 June 2023 (UTC)
:::::These error messages are specific to this module, not to all methods of fetching stuff from wikidata. {{tq|could it be displayed instead of footnote number?}} What do you mean by that?
:::::—[[User:Trappist the monk|Trappist the monk]] ([[User talk:Trappist the monk|talk]]) 15:31, 23 June 2023 (UTC)
::::::I thought that that might be the case, "Category:Module:Wd reference errors" would be fine.
::::::I mean could an error be displayed where the citation in the text would be, rather than in the reference section. So rather than <sup>[1]</sup>, there would be a message <sup>[some cutdown version of the error message]</sup>. Similar to how other inline messages work. -- LCU '''[[User:ActivelyDisinterested|ActivelyDisinterested]]''' <small>''∆[[User talk:ActivelyDisinterested|transmissions]]∆'' °[[Special:Contributions/ActivelyDisinterested|co-ords]]°</small> 15:56, 23 June 2023 (UTC)
:::::::What {{tq|inline messages}} replace a superscript reference indicator with a plain-text message? I have seen messages (as separate templates – {{tlx|failed verification}} for example) follow the reference indicator but never an outright replacement. I'm not enthusiastic about figuring out how to do that and am not sure it is desirable were it doable – I'm not really interested in doing significant work on this module. I am willing to add the category but beyond that, I leave it to someone else.
:::::::—[[User:Trappist the monk|Trappist the monk]] ([[User talk:Trappist the monk|talk]]) 17:30, 23 June 2023 (UTC)
:::::::
:::::::{{cl|Module:Wd reference errors}} created.
:::::::—[[User:Trappist the monk|Trappist the monk]] ([[User talk:Trappist the monk|talk]]) 17:42, 23 June 2023 (UTC)
::::::::Thanks Trappist. -- LCU '''[[User:ActivelyDisinterested|ActivelyDisinterested]]''' <small>''∆[[User talk:ActivelyDisinterested|transmissions]]∆'' °[[Special:Contributions/ActivelyDisinterested|co-ords]]°</small> 18:16, 23 June 2023 (UTC)
 
*After a bit of work with [[User:Ponor|Ponor]] I've just put through a set of titles for refs on Philippine town items, which should clear about 1500 pages out of this category when it's finished processing (hopefully later tonight). Sampling some of the others I think the majority are likely to be also missing a "title" field. However, there are a few complicated ones - eg I have no idea what is going on with [[Canadian English]], where the references ''seem'' to have the right metadata. [[User:Andrew Gray|Andrew Gray]] ([[User talk:Andrew Gray|talk]]) 22:38, 27 June 2023 (UTC)
*:Just to be clear, it was my unsuccessful attempt, and Andrew was kind enough to sort things out properly. I'm only thinking: wouldn't it be better to have a link in those red messages that takes you straight to wikidata, where a title is missing, instead of the generic message that leaves you clueless where and what needs to be done? [[User:Ponor|Ponor]] ([[User talk:Ponor|talk]]) 23:56, 27 June 2023 (UTC)
*:It's already at least 1400 down, nicely done. -- LCU '''[[User:ActivelyDisinterested|ActivelyDisinterested]]''' <small>''∆[[User talk:ActivelyDisinterested|transmissions]]∆'' °[[Special:Contributions/ActivelyDisinterested|co-ords]]°</small> 00:44, 28 June 2023 (UTC)
*::Thanks! Cleared off another 200-odd now. I think that might be the easiest ones but I'll see if there's others that can be solved in a batch - there seems to be some possibilities with Swiss data there but I haven't quite disentangled it yet.
*::Looking at [[Canadian English]] which I mentioned above, I ''think'' the problem here is that the reference statements have {{wpl|1810}}. This isn't supported by the mapping for either {{tl|cite web}} or {{tl|Cite Q}}, which I think is why it's going to an error message.
*::This particular case is a weird one, but in general this is a fairly common pattern for things which are sourced with an ID property - combine "named as" with {{wpl|248}} and an ID property - [https://www.wikidata.org/wiki/Q7529556#Q7529556$2FEF861C-EB11-49DC-9CFA-44EDB35A407E example]. I wonder then if it would be worth tweaking Cite Q so that it can treat {{wpl|1810}} as a backup to {{wpl|1476}} if an actual title is not present (the ID properties are already supported by Cite Q). That might clean up a swathe of them. [[User:Andrew Gray|Andrew Gray]] ([[User talk:Andrew Gray|talk]]) 23:26, 28 June 2023 (UTC)
*:::Don't quote me on this, but I believe this is all using Cite Web not Cite Q. -- LCU '''[[User:ActivelyDisinterested|ActivelyDisinterested]]''' <small>''∆[[User talk:ActivelyDisinterested|transmissions]]∆'' °[[Special:Contributions/ActivelyDisinterested|co-ords]]°</small> 00:29, 29 June 2023 (UTC)
*::::{{ping|ActivelyDisinterested}} Yes, you are right. And {{ul|Andrew Gray}} is right that the problem is with {{property|P1810}}. I think it is a good idea to modify this module to use P1810 as title when {{property|P1476}} is not present. By the way, I thank Andrew Gray very much for his work on eliminating the errors. [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 13:32, 30 June 2023 (UTC)
*:::::I've implemented the suggested changes in [[module:wd/sandbox|the sandbox]]. A sample output is in [[user:Janhrach/sandbox|my sandbox]]. The first test shows that the module correctly removes {{property|P1810}}. The second and the third reference in the second test shows that the module uses P1810 as the title if {{property|P1476}} is missing. However, the output isn't correct – the replaced title is actually the name of the database. But this is just a consequence of the incorrect handling of database references. Until I will have completely fixed the handling of database references, I am not going to make an edit request fixing P1810. [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 15:34, 1 July 2023 (UTC)
{{od}}{{ping|ActivelyDisinterested|Andrew Gray}} I've fixed the handling of database references. The sample output in [[User:Janhrach/sandbox|my sandbox]]. Previously, database references were displayed using Cite Q with an additional id parameter, see for example the reference no. 8 in my sandbox. Now, the module fetches {{property|P1687}} properties from the item in {{property|P248}}. Then a URL is generated from the first P1687 whose datatype is external-id and is present in the reference; the generated URL is then handled in the same manner as {{property|P854}}. Additionally, I have modified the handling of {{property|1810}} to use it as title only when a URL is present to avoid bugs. I would be happy if you reviewed my code. [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 16:28, 3 July 2023 (UTC)
 
:@[[User:Janhrach|Janhrach]] the output there looks good, thankyou for looking into it! [[User:Andrew Gray|Andrew Gray]] ([[User talk:Andrew Gray|talk]]) 21:20, 4 July 2023 (UTC)
:I was hoping this would help clear down the cat, big it's doesn't seem to have happened. Wasy expectation wrong or is there some other update that has to happen? -- LCU '''[[User:ActivelyDisinterested|ActivelyDisinterested]]''' <small>''∆[[User talk:ActivelyDisinterested|transmissions]]∆'' °[[Special:Contributions/ActivelyDisinterested|co-ords]]°</small> 12:14, 11 July 2023 (UTC)
::{{ping|ActivelyDisinterested}} I think most of the errors are caused by missing titles in URL-only references or similar. That couldn't be fixed any other way than by improving Wikidata. [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 12:37, 11 July 2023 (UTC)
:::Thanks for the explanation. -- LCU '''[[User:ActivelyDisinterested|ActivelyDisinterested]]''' <small>''∆[[User talk:ActivelyDisinterested|transmissions]]∆'' °[[Special:Contributions/ActivelyDisinterested|co-ords]]°</small> 12:39, 11 July 2023 (UTC)
::::@[[User:ActivelyDisinterested|ActivelyDisinterested]] I think someone may have enabled a new infobox lookup or similar as well - it was down to about 1000 at one point and has now risen again. So I guess that new additions are outpacing any corrections. Wonder if it's possible to track those numbers somehow, hmm.
::::I'll see if I can figure out some more potential batch fixes on the WD side to try and bring it down again. [[User:Andrew Gray|Andrew Gray]] ([[User talk:Andrew Gray|talk]]) 16:59, 11 July 2023 (UTC)
:::::[https://petscan.wmflabs.org/ PetScan] allows you to output the content of categories (the output tab allows you to download the results). I do the same for my work on [[:Category:Harv and Sfn no-target errors]]. It would manually running the scan periodically though. -- LCU '''[[User:ActivelyDisinterested|ActivelyDisinterested]]''' <small>''∆[[User talk:ActivelyDisinterested|transmissions]]∆'' °[[Special:Contributions/ActivelyDisinterested|co-ords]]°</small> 17:58, 11 July 2023 (UTC)
::::::Very belatedly, but FYI I'm now running a regular script to check on this - logs the current number and the most recent item. Usually drifts down by a couple of items a day. Will keep an eye out for sudden spikes which indicate a batch that could be addressed.
::::::After some further investigation, it looks like the vast majority of these seem to be software version numbers that reference the release notes with a plain URL, and while it's straightforward to add a title to the reference ''manually'', it's unfortunately a bit beyond my abilities to write up a bot to do it at scale. [[User:Andrew Gray|Andrew Gray]] ([[User talk:Andrew Gray|talk]]) 20:58, 8 August 2023 (UTC)
 
=== Edit request on 5 July 2023 ===
{{Edit template-protected|Module:Wd|answered=yes}}
Please copy [[Module:wd/sandbox|the sandbox]] to the [[Module:wd|main module page]]. The new code fixes handling of database references (as described in my last reply in this discussion) and uses {{property|P1810}} as the reference title when a URL is present in the reference but {{property|P1476}} is not. [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 12:15, 5 July 2023 (UTC)
 
:{{complete2}}. '''''[[User:Paine Ellsworth|<span style="font-size:92%;color:darkblue;font-family:Segoe Script">P.I.&nbsp;Ellsworth</span>]]'''''&thinsp;,&nbsp;[[Editor|<span style="color:black">ed.</span>]]&nbsp;[[User talk:Paine Ellsworth|<sup>put'er&nbsp;there</sup>]]&nbsp;<small>16:42, 5 July 2023 (UTC)</small>
::Thank you. [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 18:34, 5 July 2023 (UTC)
:::''Happy to help!''&nbsp;'''''[[User:Paine Ellsworth|<span style="font-size:100%;color:darkblue;font-family:Segoe Script">Paine</span>]]'''''&nbsp;&nbsp;<small>18:56, 5 July 2023 (UTC)</small>
 
== Using appropriate CS1 templates ==
 
It appears that {{t|Wikidata}} always uses {{t|Cite web}}. Sometimes that differs a bit from e.g. {{t|Cite news}} or other CS1 templates, though. Would it be possible to improve the module so that it recognizes when it's citing a newspaper/book/journal and uses the appropriate template? <span style="color:#AAA"><small>&#123;{u&#124;</small><span style="border-radius:9em;padding:0 5px;background:#088">[[User:Sdkb|<span style="color:#FFF">'''Sdkb'''</span>]]</span><small>}&#125;</small></span> <sup>[[User talk:Sdkb|'''talk''']]</sup> 04:23, 2 September 2023 (UTC)
 
:{{ping|sdkb}} Basically, there are two types of sources on Wikidata: ones using {{property|P248}} and ones using {{property|P854}}. Per [[Wikidata:Help:Sources]], newspapers, books and journals should use the former option. Only citations containing P854 are formatted using {{tl|Cite web}}. [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 06:48, 2 September 2023 (UTC)
::This touches on [[Module_talk:Wd#References_mapping|the discussion about mapping above]]. Currently, for something like a newspaper article, the correct procedure seems to be to use {{wpl|P248}} for the newspaper name and {{wpl|P854}} for the article URL. Only using P248 would be an incomplete citation, as it would not lead back to the specific article. <span style="color:#AAA"><small>&#123;{u&#124;</small><span style="border-radius:9em;padding:0 5px;background:#088">[[User:Sdkb|<span style="color:#FFF">'''Sdkb'''</span>]]</span><small>}&#125;</small></span> <sup>[[User talk:Sdkb|'''talk''']]</sup> 16:02, 2 September 2023 (UTC)
:::{{ping|Sdkb}} {{property|P248}} should contain not the newspaper item, but the article item. The Wikidata guideline says that every cited article should have its own item. [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 06:45, 3 September 2023 (UTC)
::::@[[User:Janhrach|Janhrach]], that would be wildly impractical for simple newspaper articles. <span style="color:#AAA"><small>&#123;{u&#124;</small><span style="border-radius:9em;padding:0 5px;background:#088">[[User:Sdkb|<span style="color:#FFF">'''Sdkb'''</span>]]</span><small>}&#125;</small></span> <sup>[[User talk:Sdkb|'''talk''']]</sup> 13:40, 3 September 2023 (UTC)
:::::{{ping|sdkb}} I understand, but that's a Wikidata policy. I am not sure, but I think I have read somewhere on Wikidata about a tool for generating newspaper article items on demand – it may be useful. [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 19:06, 9 September 2023 (UTC)
 
== Coordinates precision ==
 
Forgive me my laziness, I'm hoping someone will know the answer without digging too deep into the code. I would like <code><nowiki>{{#invoke:Wd|property|Q522100|P625|P518=Q1233637}}</nowiki></code> to return
* <code>43°26'N, 16°41'E</code>
instead of
* <code>{{#invoke:Wd|property|Q522100|P625|P518=Q1233637}}</code>.
How do I set the precision? I see it in the code, but not in any of the examples. Thanks. [[User:Ponor|Ponor]] ([[User talk:Ponor|talk]]) 15:13, 24 September 2023 (UTC)
 
:{{ping|Ponor}} The code probably uses the precision set in Wikidata, not in Wikipedia. [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 14:38, 27 September 2023 (UTC)
 
== Built-in citation needed function ==
 
Would it be possible to build in a mechanism for the references function of {{t|Wikidata}} to output a {{t|Citation needed}} tag if it does not come up with any references? For instance, when we use the template to fetch the number of students at a university, it's theoretically possible that someone in the future will update the {{wpl|2196}} (setting the more recent value to preferred rank) but not add references. If that happens, it'd be nice for there to be a citation needed tag rather than for the references function to just not display. <span style="color:#AAA"><small>&#123;{u&#124;</small><span style="border-radius:9em;padding:0 5px;background:#088">[[User:Sdkb|<span style="color:#FFF">'''Sdkb'''</span>]]</span><small>}&#125;</small></span> <sup>[[User talk:Sdkb|'''talk''']]</sup> 04:21, 4 October 2023 (UTC)
:I'm seeing a use case for this sort of thing at [[Associated Students of Pomona College]], where [[Module:WikidataIB]] should be used instead of this module, per the documentation and a related RFC. Using that module will take care of sourcing for you and will decline to show data when sourced numbers are not available. You could tell the module what to display or output a tracking category if if can't get a sourced number. – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 04:57, 4 October 2023 (UTC)
::@[[User:Jonesey95|Jonesey95]], thanks for the reply; I'll look into converting to [[Module:WikidataIB]] there. The particular use case that prompted me to ask here was the first sentence of {{section link|Pomona College|Student body}}, where the number of students is used in the prose, so just blanking isn't an option. When I was updating [[wikidata:Q7227384#P2196|the data]] for this semester on Wikidata, I tried waiting a moment to add the reference for the new data, hoping that I'd configured the <code>single</code> flags (or whatever it is I need to be configuring; perhaps I need to only allow <code>preferred</code>-ranked data?) well enough that it would identify that a reference is missing. But it just spit out all the references for the old data instead. The flags are a confusing enough part of the template that I just haven't been able to get them to work quite right. <span style="color:#AAA"><small>&#123;{u&#124;</small><span style="border-radius:9em;padding:0 5px;background:#088">[[User:Sdkb|<span style="color:#FFF">'''Sdkb'''</span>]]</span><small>}&#125;</small></span> <sup>[[User talk:Sdkb|'''talk''']]</sup> 05:41, 4 October 2023 (UTC)
::As far as I know WikidataIB does not yet display any references &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 09:06, 4 October 2023 (UTC)
 
== Adding names to the coordinates list ==
 
I'm using {{tl|GeoGroup}} on [[Misty Range]] where I pull the coordinates into the table of mountains using {{tl|wikidata}}:
<br/>e.g. <nowiki>{{wikidata | property | page=Mount Rae | linked | coord}}</nowiki> <br/>That works fine but when I click the OpenStreetMap link, the coordinates list on the left is showing "#1", "#2", "#3", "#4" for the names/labels for each coordinate. If you call {{tl|coord}} directly and pass the ''name'' parameter, then OSM will display that name rather than "#1". However, I don't see how can set the coordinates name when I'm using {{tl|wikidata}} to extract the coordinates. [[User:RedWolf|RedWolf]] ([[User talk:RedWolf|talk]]) 22:10, 4 September 2023 (UTC)
 
:{{ping|RedWolf}} From a quick look at the source code of the module, it seems that is doesn't implement named coordinates. [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 13:55, 14 September 2023 (UTC)
 
:*Thanks. I wonder if we could add a new named argument such as "coords_title" and then modify Config:getValue() to append this argument (if given) to the URL it builds when datatype = 'globecoordinate'. [[User:RedWolf|RedWolf]] ([[User talk:RedWolf|talk]]) 17:19, 23 September 2023 (UTC)
 
*I have created [[Module:Titled_coords]] and its helper template {{tl|Titled_coords}} to address this issue. [[User:RedWolf|RedWolf]] ([[User talk:RedWolf|talk]]) 21:33, 20 October 2023 (UTC)
 
== Edit request ==
 
{{edit template-protected|Module:wd|answered=yes}}
Line 2006: please change "crimson" to "#d33" per above. Also change "4" on the line 1819 to "5".
[[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 13:26, 26 October 2023 (UTC)
:{{done}}<!-- Template:ETp --> – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 14:36, 26 October 2023 (UTC)
 
== Problems with this module ==
 
I get it, semantic web shit is cool for nerds, but this doomed tech experiment is hurting Wikipedia instead of helping it. The people responsible should switch focus; their goal should be to help Wikipedia editors and not the likes of Google and LLMs and other cringe techbro buzzwords. I understand that the ideal solution, getting rid of wikidata, will not happen, so we should try to minimize the harm it is causing.
 
There are a bunch of problems with this module:
 
# This module shows errors, but it is '''not clear how to fix''' the errors unless you spend 73 hours trying to understand how it and Wikidata work. The solution should be two-fold:
#* It should be made clear on wikidata ''and'' in the article which attributes are missing/incorrect. Nota bene, currently this is explained in neither of those places. One or the other is not an acceptable solution. It should be explained in both places.
#* Someone should write a detailed tutorial/helppage. But a link to that is ''not enough''; in addition we need specific instructions which piece of data is causing the problem.
# The warning messages are '''alarmist and displayed very prominently''', even when it is an incredibly minor problem or not a real problem at all. A very large majority of the pages in [[:Category:Module:Wd_reference_errors|Category:Module:Wd reference errors]] do not have a problem that is big enough to warrant such a obnoxious warning message.
#*For example: A reference url without a title (which appears to be optional at Wikidata) is handled poorly. For comparison, <code><nowiki>{{Cite web|url=https://github.com/andresriancho/w3af/releases/tag/1.6.54}}</nowiki></code> produces:<br>[https://github.com/andresriancho/w3af/releases/tag/1.6.54 https://github.com/andresriancho/w3af/releases/tag/1.6.54]. <span style="color:#d33">{<nowiki/>{</span>[https://en.wikipedia.org/wiki/Template:Cite_web cite web]<span style="color:#d33">}}: Missing or empty |title= (</span>[https://en.wikipedia.org/wiki/Help:CS1_errors#citation_missing_title help]<span style="color:#d33">)</span><br>That still gives a clickable reference and the red message is less prominent. <br>The Wikidata equivalent instead shows nothing. No explanation of what is wrong or how to fix it. All you get is this message that explains nothing and links to generic advice that isn't applicable:<br><span style="color:crimson">Error: Unable to display the reference properly. See [https://en.wikipedia.org/wiki/Module:Wd/doc#References the documentation] for details.</span><br>
#The message '''doesn't even link to the reference URL'''.
#The message '''falsely claims it is an error''' when no error has occured. There is just a missing piece of wikidata. 99.99999% of people who see that message are not willing and able to add that piece of wikidata.
#The message '''doesn't even link to the place on Wikidata''' where the problem is.
#The message uses <span style="color:crimson">crimson</span> while other messages like the cite web template use <span style="color:#d33">#d33</span>.
 
This means that people would have to read and understand all that documentation, find the ___location where the reference is inserted, figure out they have to click on the pencil icon, discover an entirely new and incredibly unuserfriendly interface on a separate website and figure out how to fix the error there, then go back to the article to see if they actually managed to fix the problem, discover they have not or that there are other problems and repeat the process (newsflash: 99% of Wikipedia editors won't do all that, why are you trying to force them to).
 
Even if you do something that should be simple, e.g. you add an infobox to an article, you get the message and no way to fix it. For example {{tl|Infobox Swiss town}} causes problems for example in [[Lausanne]], [[Geneva]], [[Zug]], [[Montreux]], [[Bern]], [[Solothurn]] (I got too lazy to find more examples).
 
I understand that this is people's baby and the WMF probably wasted a fuckton of money on it; but it should be clear that this is a net negative for 99% of editors at the moment. Things used to be so simple. More complexity is not an improvement. [[User:Polygnotus|Polygnotus]] ([[User talk:Polygnotus|talk]]) 04:00, 24 October 2023 (UTC)
:That is quite a rant. I agree with one point, at least. In [[Lausanne]], reference #2 displays "Error: Unable to display the reference properly. See the documentation for details." instead of displaying "https://www.pxweb.bfs.admin.ch/pxweb/fr/px-x-0102020000_201/-/px-x-0102020000_201.px/table/tableViewLayout2/?rxid=c5985c8d-66cd-446c-9a07-d8cc07276160", which is the source that supports the population figure. Showing only the error message is unhelpful. Showing the URL along with a more explanatory error message would be helpful; something like "Error: url requires title in Wikidata" (with a link to the relevant section of P1082 in the article's Wikidata entry) might lead ambitious editors to fix the actual problem. – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 04:26, 25 October 2023 (UTC)
:{{ping|Polygnotus}} On the problems you listed:
:# The relevant section is four-paragraph-long. While it doesn't directly describe how to fix a reference, it makes it clear when is the error printed. Everyone who doesn't understand can ask on this page. Yes, the messages could refer to specific parts of the reference which are invalid, I will work on that later. Note: this module is not directly related to Wikidata as a project, it is a <u>Wikipedia module</u> for rendering data.
:# Yes, the messages should be more specific. As for the messages being too alarmist, see [[Module talk:wd/Archive 1#Reference formatting bug when using "author name string" (P2093)|this discussion]]. [[User:Trappist the monk]] wanted an error message if the reference is not renderable using CS1, and I agree with them.
:# See 2.
:# See 2.
:# Ok, this should also be fixed.
:# This is a minor issue fixable with an edit request.
:In the end, all good arguments against Module:Wd can be summarized into following:
::The error massage should be more specific.
:Right now, I do not spend much time editing Wikipedia. The reference handling function should be cleaned up first. To fix it, it is needed to fix the testcases.
:[[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 13:04, 26 October 2023 (UTC)
::The citation (reference #2 in [[Lausanne]]) is renderable using {{tl|cite web}}, though. It looks like this:
::
::{{cite web|url=https://www.pxweb.bfs.admin.ch/pxweb/fr/px-x-0102020000_201/-/px-x-0102020000_201.px/table/tableViewLayout2/?rxid=c5985c8d-66cd-446c-9a07-d8cc07276160}}
::
::The error message is incorrect. This basic problem is not yet fixed. – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 14:44, 26 October 2023 (UTC)
:::{{ping|Jonesey95}} By "renderable using CS1", I meant without errors. Also, I mentioned the phrase only in the last comment. The documentation is more specific.
:::I know the error message should say what extra properties does the reference contain, or which needed properties it does not, but I will fix that later. Maybe the module should leave reporting a missing title for now, as a temporary solution. [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 14:59, 26 October 2023 (UTC)
 
== Bot task: adding "title" to a reference url ==
 
It's Grumpy again; is there a bot that adds the title to a reference URL on Wikidata if its missing? It could simply scrape the HTML <nowiki><title></nowiki> tag. The results wouldn't be perfect, but of course they would be better than the current situation. The bot could leave a short message on the relevant talkpage explaining this is a bot action and humans are invited to make improvements where they see fit. [[User:Polygnotus|Polygnotus]] ([[User talk:Polygnotus|talk]]) 16:58, 26 October 2023 (UTC)
 
:I've asked on Wikidata. [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 13:14, 27 October 2023 (UTC)
::{{ping|Janhrach}} I see your post [https://www.wikidata.org/wiki/Wikidata:Project_chat#Bot-related_question here] but shouldn't we ask on [[WP:BOTREQ]] instead? [[User:Polygnotus|Polygnotus]] ([[User talk:Polygnotus|talk]]) 10:19, 28 October 2023 (UTC)
:::This is an intriguing idea, but it'd have to be handled with care. Bot messages on every talk where this happens is not handling with care (it's asking for "external links modified" 2.0). <span style="color:#AAA"><small>&#123;{u&#124;</small><span style="border-radius:9em;padding:0 5px;background:#088">[[User:Sdkb|<span style="color:#FFF">'''Sdkb'''</span>]]</span><small>}&#125;</small></span> <sup>[[User talk:Sdkb|'''talk''']]</sup> 13:41, 28 October 2023 (UTC)
:::{{ping|Polygnotus}} (I assume you meant [[d:WD:BOTREQ]]) The page says that asking on the Project Chat is preferable, so I decided to ask there first. [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 19:30, 1 November 2023 (UTC)
 
== Edit request 15 December 2023 ==
 
{{Edit template-protected|answered=yes}}
 
'''Description of suggested change: Add optional globalSiteId parameter, for getEntityId() usage to get the QID from a non-enwiki sitelink'''
 
'''Diff:''' See [[Special:Diff/1190036817]]
 
'''Testcase:''' See [[Special:Diff/1190040466]]
 
Example: {{tq|<nowiki>{{#invoke:wd/sandbox|label|raw|page=Crosslauf-Europameisterschaften 2009|globalSiteId=dewiki}}</nowiki>}} should yield Q1141358. Implemented on sandbox and verified all test cases pass. It should not affect any existing behavior, as it only adds a new feature. If there is no opposition to this change, I can implement it. --[[User:Habst|Habst]] ([[User talk:Habst|talk]]) 16:12, 15 December 2023 (UTC)
 
:What is the use case? &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 16:30, 15 December 2023 (UTC)
::@[[User:MSGJ|MSGJ]], in my case, I wanted to use it to help translate foreign-language pages in my userspace. If I could easily (with a regex) translate all <nowiki>[[wikilinks]]</nowiki> in a dewiki article into <code><nowiki>{{#invoke:wd/sandbox|label|raw|page=wikilink|globalSiteId=dewiki}}</nowiki></code> (or a template that would make this syntax shorter), I could combine that with {{tl|LinkedLabel}} to effectively translate all the wikilinks in a dewiki article into their enwiki equivalent titles.
::This is very helpful, because often times when translating an article, even if you understand the words, it can be difficult to know for sure what the appropriate target for a wikilink is. This can currently be done manually by clicking each wikilink in dewiki and then clicking "view wikidata item", but that's a painstaking manual process that only works one link at a time. --[[User:Habst|Habst]] ([[User talk:Habst|talk]]) 21:48, 15 December 2023 (UTC)
:::Okay, sounds like a good idea! &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 21:52, 15 December 2023 (UTC)
:::: {{done}} [[User:Pppery|* Pppery *]] [[User talk:Pppery|<sub style="color:#800000">it has begun...</sub>]] 23:24, 22 December 2023 (UTC)
 
== Wikidata reference errors at [[Taguig]] ==
 
There are two. I have to go to work soon and don't have time to figure out what's wrong over at Wikidata; can I irresponsibly pass ownership of this problem to someone here who understands how to fix it? [[User:Folly Mox|Folly Mox]] ([[User talk:Folly Mox|talk]]) 13:58, 12 January 2024 (UTC)
 
:Well I've retrieved archived for the deadlinked 2015 and 2019 "poverty incidence" reference URLs at [[:d:Q1643]]: [http://web.archive.org/web/20230404000411/https://psa.gov.ph/sites/default/files/City%20and%20Municipal-level%20Small%20Area%20Poverty%20Estimates_%202009,%202012%20and%202015_0.xlsx 2015], [http://web.archive.org/web/20230404015723/https://psa.gov.ph/sites/default/files/Table%202a.%20Updated%20Annual%20Per%20Capita%20Poverty%20Threshold%2C%20Poverty%20Incidence%20and%20Magnitude%20of%20Poor%20Population%20with%20Measures%20of%20Precision%2C%20%20by%20Region%2C%20Province%20and%20HUC_2018.xlsx 2018].{{pb}}I can't figure out how to edit these in at the Wikidata item (which is greylocked) even in desktop view. [[User:Folly Mox|Folly Mox]] ([[User talk:Folly Mox|talk]]) 03:40, 13 January 2024 (UTC)
:{{ping|Folly Mox}} I have fixed that, the reference had missing a title. [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 08:32, 13 January 2024 (UTC)
::Thank you for those fixes. Is there any way the error output of this module could be made a bit more specific? As a moderately technical editor with at least a basic understanding of where to look for Wikidata errors, I'm not sure how long it would have taken me to guess that the problem here was a missing {{code|title}}. [[User:Folly Mox|Folly Mox]] ([[User talk:Folly Mox|talk]]) 15:22, 13 January 2024 (UTC)
:::I have this in my to-do list, but I don't know when I'll do it. The problem is that the testcases are currently triplicated in three pages. I have started centralizing them, but it is tedious and repetitive, so I rarely work on this. I don't want to substatially modify the module until the testcases are ready. So until the testcases are centralized and the module is modified, I will answer editors' questions here. [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 15:37, 13 January 2024 (UTC)
 
== Error ==
 
<code><nowiki>{{wikidata|references|P11698|eid=Q7227384}}</nowiki></code> ({{wikidata|references|P11698|eid=Q7227384}}) is displaying an error, presumably because the module is having trouble with [[wikidata:Q7227384#P11698|the statement]]'s reference including {{wpl|P958}}. It should be mapped to {{t|Cite web}}'s {{para|at}} parameter. Could this be fixed? <span style="color:#AAA"><small>&#123;{u&#124;</small><span style="border-radius:9em;padding:0 5px;background:#088">[[User:Sdkb|<span style="color:#FFF">'''Sdkb'''</span>]]</span><small>}&#125;</small></span> <sup>[[User talk:Sdkb|'''talk''']]</sup> 06:10, 1 February 2024 (UTC)
 
:{{ping|Sdkb}} I have made a fix in the sandbox:
:{{#invoke:wd/sandbox|references|P11698|eid=Q7227384}}
:I am not sure this is how it should be displayed, the meaning of "B22" would not be clear for me if I saw it in a citation while reading. What do you think? [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 20:31, 3 February 2024 (UTC)
::{{re|Janhrach}} Looks good to me! My view is that it should be displayed the same as it would in CS1: <ref>{{cite web|title=Pomona College 2023–2024 Common Data Set|url=https://pomona.app.box.com/s/s82xr2o7pptlqxs17reg0nnfyandjcef|publisher=Pomona College|at=B22|access-date=1 February 2024}}</ref> I agree that the display in CS1 isn't ideal, but that's a larger issue for CS1 to deal with (and not a particularly dire one — having the specific ___location might help someone trying to verify the information, but it's not really going to harm anyone confused by it). Cheers, <span style="color:#AAA"><small>&#123;{u&#124;</small><span style="border-radius:9em;padding:0 5px;background:#088">[[User:Sdkb|<span style="color:#FFF">'''Sdkb'''</span>]]</span><small>}&#125;</small></span> <sup>[[User talk:Sdkb|'''talk''']]</sup> 23:01, 3 February 2024 (UTC)
:::Ok, so I will submit an edit request in several days if nobody will have complained. Thank you for reporting this. [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 08:14, 4 February 2024 (UTC)
::::@[[User:Janhrach|Janhrach]], seeing no concerns, are we good to implement? <span style="color:#AAA"><small>&#123;{u&#124;</small><span style="border-radius:9em;padding:0 5px;background:#088">[[User:Sdkb|<span style="color:#FFF">'''Sdkb'''</span>]]</span><small>}&#125;</small></span> <sup>[[User talk:Sdkb|'''talk''']]</sup> 03:57, 8 February 2024 (UTC)
:::::{{ping|Sdkb}} Yes, we are. Considering you are a template editor, could you please make the change yourself, so that an edit request isn't needed? [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 09:40, 11 February 2024 (UTC)
::::::{{done}} [[Special:Diff/1206234935|here]]. Please let me know if there are any issues. Cheers, <span style="color:#AAA"><small>&#123;{u&#124;</small><span style="border-radius:9em;padding:0 5px;background:#088">[[User:Sdkb|<span style="color:#FFF">'''Sdkb'''</span>]]</span><small>}&#125;</small></span> <sup>[[User talk:Sdkb|'''talk''']]</sup> 15:58, 11 February 2024 (UTC)
::::::@[[User:Janhrach|Janhrach]] if you would like the TPE userright, please let me know, as I believe you meet the criteria &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 21:26, 11 February 2024 (UTC)
:::::::I believe I am one template edited short of one of the requirements. [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 19:29, 18 February 2024 (UTC)
{{reflist-talk}}
 
== Accessing titles from other Wikipedias ==
 
{{courtesy link|Module talk:Wd/Archive 1#Titles from other wikipedias}}
 
Still interested in this feature: given a wikidata Q-id and an ISO-639 code 'xx', return the title of the article at xx-wiki for that item. Perhaps as in this mockup:
: <code><nowiki>{{wikidata|wikipedia|lang=es|eid=</nowiki>[[d:Q43287|Q43287]]<nowiki>}}</nowiki></code> → Imperio alemán
There's also another editor interested in this; adding {{u|Your Friendly Neighborhood Sociologist}}. Thanks, [[User:Mathglot|Mathglot]] ([[User talk:Mathglot|talk]]) 08:59, 14 February 2024 (UTC)
 
:Theres a suggestion on the ''courtesy link''ed page to use <nowiki>{{#invoke:WikidataIB|getSiteLink|qid=Q43287|wiki=eswiki|ps=1}}</nowiki> >> {{#invoke:WikidataIB|getSiteLink|qid=Q43287|wiki=eswiki|ps=1}}, @[[User:Mathglot|Mathglot]]. [[User:Ponor|Ponor]] ([[User talk:Ponor|talk]]) 12:18, 16 February 2024 (UTC)
:: {{re|Ponor}} Thank you for your comment. I thought I missed a reply in that discussion or something, but it turns out that it came from a different discussion in section {{slink|Module talk:Wd/Archive 1|Getting values (labels) from a local Wikipedia|nopage=yes}}, and unfortunately I never saw that one. Also, I believed the [[Special:Diff/1019358531|response]] I got in the original discussion that it wasn't possible, so this is a very pleasant surprise. That's some eagle-eyed sleuthing; thanks again! [[User:Mathglot|Mathglot]] ([[User talk:Mathglot|talk]]) 23:12, 16 February 2024 (UTC)
:::Oh... thank you, @[[User:Mathglot|Mathglot]], I learned something new too. This could be made into a separate template, if needed, so other people can find it: {{tlx|sitelink|qid|wiki}} // {{tlx|sitelink|Q43287|es}} → [[:es:{{#invoke:WikidataIB|getSiteLink|qid=Q43287|wiki=eswiki|ps=1}}]], or whatever you wanna to call it. It's a 10 minute job. [[User:Ponor|Ponor]] ([[User talk:Ponor|talk]]) 23:50, 16 February 2024 (UTC)
:::: {{re|Ponor}}, yeah, and creating a template wrapper for it got added to my list the minute you replied and I saw it was workable. Only for me, it's more like a 2–3 hour job: ten minutes to code and test it, just as you say; then maybe 30-45' to write the doc page and maybe create a couple of template shortcuts, and another hour-plus or so to hunt down some RW examples in a few languages, and another hour or so to write the test cases page. Maybe I need to go to perfectionist jail for a while {{wink}}. I think it might need several redirect names; probably 'sitelink' is a good template name, but won't mean much to those who think 'foreign wikipedia title' and it's not obvious to me how to ensure it is findable; all your suggestions would be welcome.
:::: As it happens, I'm deep into a wrapper creation right now: [[Draft:HasTemplate]], which is going to be incredibly useful once it is released. It's got a backstory that is turning out to be a lot more complex than I ever expected; you can look at [[Template talk:Template parameter value#Can it just detect if the template is there|this discussion]] if you're curious, but fair warning: it really gets into the weeds on some things, so what I thought was going to be a terse, one-sentence, one-response discussion, is way more than that. (Feel free to wade in there, if you're not afraid of drowning in the details.) So, I will definitely write {{tl|sitelink}} (or whatever we decide to call it) but you never know when something that seemed like a ten-minute thing at the time, turns out to have all sorts of little issues around it and goes on a lot longer, but I hope not! [[User:Mathglot|Mathglot]] ([[User talk:Mathglot|talk]]) 00:33, 17 February 2024 (UTC)
:::::Well... I did something here: [[Template:Sitelink]] :) People will probably find it in its category, with other similar templates. Need to figure out how to make the foreign titles wikilinked, nothing like <nowiki>[[:es:xxxx|]]</nowiki> worked.
:::::* <nowiki>{{sitelink|es|qid=Q43287}}</nowiki>: {{sitelink|es|qid=Q43287}}
:::::* <nowiki>{{sitelink|fr|title=German empire}}</nowiki>: {{sitelink|fr|title=German empire}} (was cheap to get)
:::::* <nowiki>{{sitelink|fr}}</nowiki> in any article should also work
:::::Feel free to play further! And whoever's reading this. [[User:Ponor|Ponor]] ([[User talk:Ponor|talk]]) 01:22, 17 February 2024 (UTC)
:::::: Well, you just saved me ten minutes. {{wink}} (I went ahead and updated the doc a bit more; see what you think.) I tested {{tlx|sitelink|fr}} at [[German Empire]], and it worked perfectly, although there probably won't be much call for that. On the other hand, being able to use it from the associated Talk page would be very useful; I tested it at [[Talk:German Empire]], and of course no big surprise that it returned empty. Any way it could be updated to detect namespace, i.e., switch to {{tl|SUBJECTPAGENAME}} if it were on the Talk page? That would be very useful. [[User:Mathglot|Mathglot]] ([[User talk:Mathglot|talk]]) 02:52, 17 February 2024 (UTC)
:::::::@[[User:Mathglot|Mathglot]]: I have a few usecases on my 'other' wiki, for example when pointing readers to full documentation page for templates taken from enwiki, as in {{sitelink|hr|title=Template:Get QID|linked=x}} (ha! I used <nowiki>{{sitelink|hr|title=Template:Get QID}}</nowiki> here). I'm pretty sure something can be done about the talk pages, let me think about it. Should that be one wiki's talk page to another wiki's talk page or something else? One can always use QIDs and page titles, I wonder if adding more complexity to our little wrapper template would be worth it. [[User:Ponor|Ponor]] ([[User talk:Ponor|talk]]) 14:17, 19 February 2024 (UTC)
 
== "Not enough memory" errors ==
 
At [[Comparison of cross-platform instant messaging clients]], many of the table entries are displaying {{red|Lua error: not enough memory.}} for various {{tl|wikidata}} calls. I don't know anything about wikidata lookups, just passing along a message left on that article's talk-page. [[User:DMacks|DMacks]] ([[User talk:DMacks|talk]]) 04:13, 27 February 2024 (UTC)
:And it would be nice to have a better fallback in the future. Clicking on the links results currently in a not very helpful popup. https://i.imgur.com/IyXvE6p.png & [[MediaWiki:Scribunto-common-no-details]] should probably link to this page so people can get help if they need it & [[MediaWiki:Scribunto-lua-error]]. [[User:Polygnotus|Polygnotus]] ([[User talk:Polygnotus|talk]]) 04:33, 27 February 2024 (UTC)
::FWIW: The article source, at the bottom, shows "Lua memory usage: 52428782/52428800 bytes" in the limit report. – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 18:28, 28 February 2024 (UTC)
 
== A systematic way to avoid reference errors may be needed ==
I wonder, looking at [https://en.wikipedia.org/w/index.php?title=Category:Module:Wd_reference_errors&from=Com just the "Comparison of ..."] articles in {{cl|Module:Wd reference errors}} (currently 1,181 pages), whether a change to the module might help fix some of these errors. Having an error message displayed instead of a reference, especially when nothing has changed in the Wikipedia article, is not good practice. It may be helpful for someone familiar with this module and with Wikidata's structure to look through a sample of these errors to see if a default setting like "prefer the most recent reference when a reference is requested" or a similar preference might help fix some of these errors. – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 18:55, 28 February 2024 (UTC)
 
:{{ping|Jonesey95}} The vast majority of the errors are caused by missing titles. The error messages were introduced into this module as a result of [[/Archive_1#Reference formatting bug when using "author name string" (P2093)|this discussion]]. I do agree that the current message, which doesn't specify what exactly caused the issue, is not good, and I plan to fix that in some time. However, this might be a complex problem, and I don't think I will have time for that in several months, at least.
:As for the errors specifically, you might want to propose a change the module to not need titles in Wikidata references. In that case, you should read the mentioned discussion. [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 18:51, 5 March 2024 (UTC)
::A template-based reference that is missing a title is (a) incomplete, and should generate an error message, and (b) should generate an error message saying specifically that the title is missing. I hope that will not be difficult to achieve. – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 19:15, 5 March 2024 (UTC)
:::So we can do nothing about the number of the errors, except editing Wikidata. (Making a Wikidata bot adding titles to references is possible, but I can't do so.) As for no. 2, I am going to fix that ''sometime''. [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 19:59, 5 March 2024 (UTC)
::::A missing title is not an error and should not generate an error message. I asked about making a wikidata bot to add titles to references and all I got was [[Module_talk:Wd/Archive_1#Bot_task%3A_adding_%22title%22_to_a_reference_url]] 6 months ago you also said "''Right now, I do not spend much time editing Wikipedia''".[https://en.wikipedia.org/w/index.php?title=Module_talk:Wd&diff=next&oldid=1181989022] Why do we have to depend on 1 busy volunteers spare time to fix this important problem? Perhaps some of that $180.2 million of WMF revenue could be spent on something actually useful? [[User:Polygnotus|Polygnotus]] ([[User talk:Polygnotus|talk]]) 20:24, 5 March 2024 (UTC)
:::::See [[WP:BAREURL]]. If not an error message, then at least append {{tl|Bare URL inline}} to tag the reference for cleanup. – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 20:31, 5 March 2024 (UTC)
 
== Reference call returns blank on te.wikipedia.org in one case ==
 
On te.wikipedia.org, the code used in infobox template for displaying reference is not working in some cases.
Example url: https://te.wikipedia.org/wiki/%E0%B0%AA%E0%B1%8D%E0%B0%B0%E0%B0%A4%E0%B1%8D%E0%B0%AF%E0%B1%87%E0%B0%95:ExpandTemplates
 
template code that does not work<br>
 
<nowiki>{{#invoke:wd|references|Q18395504|P2046}}</nowiki>
 
similar template code that works<br>
 
<nowiki>{{#invoke:wd|references|Q18395504|P1082|P585=2011}} </nowiki>
 
 
On en.wikipedia.org at the URL https://en.wikipedia.org/wiki/Special:ExpandTemplates the code works for both cases.
 
The Templates and Modules involved are replicated on Telugu Wikipedia from English Wikipedia. I request help to address the problem.--[[User:Arjunaraoc|Arjunaraoc]] ([[User talk:Arjunaraoc|talk]]) 10:43, 20 February 2024 (UTC)
 
:{{ping|Arjunaraoc}} I think I have found out the cause of the issue, but I am not certain. Could you send me more examples of this bug?
:I didn't have much time for Wikipedia recently, and I think I won't have in the immediate future, so don't expect this to be fixed in less than ~2 weeks. I will ping you when a fix is ready. [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 17:19, 23 February 2024 (UTC)
::@[[User:Janhrach|Janhrach]], The code that I cited is used in 670+ pages on Telugu wikipedia. I found the references call with P854, P1476 working properly ([[d:Q60165513]] and corresponding Telugu Wikipedia page https://te.wikipedia.org/wiki/%E0%B0%87%E0%B0%82%E0%B0%95%E0%B1%8A%E0%B0%B2%E0%B1%8D%E0%B0%B2%E0%B1%81_%E0%B0%AE%E0%B0%82%E0%B0%A1%E0%B0%B2%E0%B0%82). So I updated almost all entries to use the working code. So while this is not a priority, let me know when the fix is ready. [[User:Arjunaraoc|Arjunaraoc]] ([[User talk:Arjunaraoc|talk]]) 10:53, 27 February 2024 (UTC)
::@[[User:Janhrach|Janhrach]], Today I found another test case where the code works on both English and Telugu Wikipeidas
::
::<pre>{{#invoke:wd|references|Q60165552|P2046}}</pre>
::<pre>{{#invoke:wd|references|Q60165552|P1082|P585=2011}} </pre>
::
::Hope that helps.. [[User:Arjunaraoc|Arjunaraoc]] ([[User talk:Arjunaraoc|talk]]) 07:04, 28 February 2024 (UTC)
:::{{ping|Arjunaraoc}} I think I know what causes the issue, but I am sure I won't have time to fix the issue in the next two weeks, if not more. Be patient, please. [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 18:22, 5 March 2024 (UTC)
:{{ping|Arjunaraoc}} The fix is ready in [[Module:wd/sandbox|the sandbox]]. If there are any problems, write to me here. Keep subscribed to this topic, so you will be notified if anybody raises an issue with this change. Thank you for reporting this bug.
:To everybody: In accordance with the policy, I will wait for several days until I update the main module. Please review my changes. [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 16:11, 22 March 2024 (UTC)
::@[[User:Janhrach|Janhrach]], Thanks for the fix. I tested it on Telugu wikipedia and found the the test cases working. [[User:Arjunaraoc|Arjunaraoc]] ([[User talk:Arjunaraoc|talk]]) 00:38, 23 March 2024 (UTC)
::{{done|Module updated.}} [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 08:11, 1 April 2024 (UTC)
 
== Getting [[Template:Update tracker]] working with qualifiers ==
 
I've been working on developing {{t|Update tracker}} and its child {{t|Update tracker item}}, templates for articles that use {{t|Wikidata}} that create a table for the talk page that lists which information needs to be updated (convenient for subjects like colleges that have a lot of data that needs updating every year).
 
I've gotten it mostly functional, except that I can't figure out how to get it to work with qualifiers (see [[Template:Update_tracker_item/testcases|the testcases]]). To function, it needs to call extra qualifier commands only when the {{para|qualifier}} or {{para|qualifier-value}} parameters are defined. I don't know of a way to conditionally add extra parameters, though, and keeping them blank causes an error.
 
Does that make sense? Anyone able to help? <span style="border:3px outset;border-radius:8pt 0;padding:1px 5px;background:linear-gradient(6rad,#86c,#2b9)">[[User:Sdkb|<span style="color:#FFF;text-decoration:inherit;font:1em Lucida Sans">Sdkb</span>]]</span> <sup>[[User talk:Sdkb|'''talk''']]</sup> 14:05, 10 April 2024 (UTC)
 
 
:@[[User:Sdkb|Sdkb]]: what do you mean by "there's an error" (in your testcases)? Is it an error thrown by the module or is it just the wrong data that you're getting? I suppose you tried
 
<syntaxhighlight lang="wikitext">
{{Wikidata |qualifier |single |{{{property|}}} |P585 |eid={{{entity|}}} |{{{qualifier|}}}={{{qualifier-value|}}} }}
</syntaxhighlight>
:Did you leave out the vertical bars in the last two variables? I did a quick test in your code, previewing your test cases while editing, and the previous code did return some values and no obvious errors.
 
:I see another problem here / for {{Q|Q10664609}}. This:
:* <nowiki>{{Wikidata|qualifier|single|eid=Q10664609|P1128|P585|P518=Q5428874}}</nowiki>→ {{Wikidata|qualifier|single|eid=Q10664609|P1128|P585|P518=Q5428874}} (current WD value is 2019)
 
:seems alright. However, in
:* <nowiki>{{Wikidata|qualifier|single|eid=Q10664609|P1128|P585}}</nowiki> → {{Wikidata|qualifier|single|eid=Q10664609|P1128|P585}}
:you'd expect the result to be 2020 (right?), but without any qualifiers the call returns the first of the two values of:
:* <nowiki>{{Wikidata|qualifier|eid=Q10664609|P1128|P585}}</nowiki> → {{Wikidata|qualifier|eid=Q10664609|P1128|P585}}
:This would require a change on WD, another "applies to" or "rank: preferred", I believe.
 
:Although, this does seem to work, so {{para|qualifier}} should be given with no value when there are other nonempty qualifiers for the property:
:* <nowiki>{{Wikidata|qualifier|single|eid=Q10664609|P1128|P585|P518=}}</nowiki>→ {{Wikidata|qualifier|single|eid=Q10664609|P1128|P585|P518=}}
:[[User:Ponor|Ponor]] ([[User talk:Ponor|talk]]) 12:56, 10 April 2024 (UTC)
::Thanks for the reply, {{u|Ponyo}}! The error I'm referencing came from the fact that {{para|qualifier}} and {{para|qualifier-value}} are optional, and the most simple use case (the first two test cases) leave them out. The previous code I tried removed the equal sign if they were not present, causing the template to evaluate as <syntaxhighlight lang="wikitext">{{Wikidata |qualifier |single |{{{property|}}} |P585 |eid={{{entity|}}} | }}</syntaxhighlight>, where the pipe and blank parameter at the end causes it to become blank. Curiously, using your more basic method, the template evaluates as <syntaxhighlight lang="wikitext">{{Wikidata |qualifier |single |{{{property|}}} |P585 |eid={{{entity|}}} | = }}</syntaxhighlight>, which I didn't even try because I presumed it would produce even more of an error, but it actually seems to cause it to work as intended. So that resolves my problem, although I don't trust that blank equals signs will always be okay for {{t|Wikidata}} as it evolves in the future, so if there's a more durable solution that'd be good to know about. <span style="border:3px outset;border-radius:8pt 0;padding:1px 5px;background:linear-gradient(6rad,#86c,#2b9)">[[User:Sdkb|<span style="color:#FFF;text-decoration:inherit;font:1em Lucida Sans">Sdkb</span>]]</span> <sup>[[User talk:Sdkb|'''talk''']]</sup> 19:45, 10 April 2024 (UTC)
:::@[[User:Sdkb|Sdkb]]: glad it worked (wasnt' sure what exactly wasn't working). I don't think the ''blank equals sign'' will cause any problems; when there's nothing on its left, it should be discarded. If, however, you want to run some tests on your variables, you can try <syntaxhighlight lang="wikitext">{{#if:…{{{qualifier|}}}…| {{Wikidata|…|{{{qualifier}}}={{{qualifier-value}}}}} | {{Wikidata|…}} }}</syntaxhighlight> Someone more familiar with parsers and stuff might tell us if there's a better way; something tells me there has to be a hard-coded = sign, and not its replacements. [[User:Ponor|Ponor]] ([[User talk:Ponor|talk]]) 20:23, 10 April 2024 (UTC)
:::The same test, using the nothing-on-the-left-of-equals-sign trick: <syntaxhighlight lang="wikitext">{{Wikidata |qualifier |single |{{{property|}}} |P585 |eid={{{entity|}}} |{{#if: some function of {{{qualifier|}}} and {{{qualifier-value}}} | {{{qualifier}}} | }} = {{{qualifier-value}}} }}</syntaxhighlight> [[User:Ponor|Ponor]] ([[User talk:Ponor|talk]]) 20:30, 10 April 2024 (UTC)
 
== Current population value ==
 
[[:Wikidata:Q6045892]] page contains population values between 2007-2022. However, when I type the [[:wikidata:Property:P1082]] value, the template calls the population value for 2007. What should I do to have it call up the population value for the most recent year?
:<code><nowiki>{{wd|property|Q6045892|P1082}}</nowiki></code> → {{wd|property|Q6045892|P1082}}
Thank you. [[User:Sadrettin|Sadrettin]] ([[User talk:Sadrettin|talk]]) 10:48, 7 April 2024 (UTC)
 
:You have at least two options, @[[User:Sadrettin|Sadrettin]]:
:* <nowiki>{{wd|property|Q6045892|P1082|P585=2022}}</nowiki> >> {{wd|property|Q6045892|P1082|P585=2022}}
:* Change the rank of the latest property on wikidata to preferred
:[[User:Ponor|Ponor]] ([[User talk:Ponor|talk]]) 13:08, 7 April 2024 (UTC)
 
:<syntaxhighlight lang="wikitext">
{{#invoke:wd
|property
|P1082
|P585={{#invoke:Wikidata
|getRawQualifier
|qualifier=P585
|property=P1082
|sort=P585
|invert=true
|limit=1
}}
}}
</syntaxhighlight>
:The above filters the multiple values of population (P1082 property) by the latest year (P585 qualifiers). If you add <code>|P459=Q6042918</code> after <code>|P1082</code>, then the result is also filtered by determination method. [[User:Serresmap|Serresmap]] ([[User talk:Serresmap|talk]]) 18:55, 18 April 2024 (UTC)
::{{ping|Serresmap}} Thank you for your reply. When I wrote this code exactly, it didn't work. Could there be a problem? Could you please check again? --[[User:Sadrettin|Sadrettin]] ([[User talk:Sadrettin|talk]]) 08:41, 23 April 2024 (UTC)
 
== Reference without title ==
 
If a reference doesn't have a title, the URL isn't shown and "Error: Unable to display the reference properly. See the documentation for details." is shown instead.<br>
Would it be possible to not use <nowiki>{{</nowiki>[[Template:Cite web|Cite web]]<nowiki>}}</nowiki> if there's no title so that the URL is shown? [[User:The RedBurn|The RedBurn]] <small>([[User Talk:The RedBurn|ϕ]])</small> 15:59, 11 May 2024 (UTC)
:This is an as-yet unaddressed problem with the module. See [[#A_systematic_way_to_avoid_reference_errors_may_be_needed|above]]. – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 03:47, 13 May 2024 (UTC)
:I plan to improve this error message; in the next ~3 months, if nothing wrong. But I agree with you it would probably be better if we let {{tl|Cite web}} to report missing titles. I thinks so because if the reference rendering fails, the module will need to report two errors (one for {{tl|Cite web}} missing/unknown param on Wikidata, and one error for {{tl|Cite Q}}) – this would be probably too confusing for non-technical editors.
:Is anybody opposed to this change?
:—[[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 09:35, 25 May 2024 (UTC)
::I have made the said change to the sandbox. Here is a result sample:
:::{{#invoke:wd/sandbox|references|Q69678|P1082}}
::Original behavior, for comparison:
:::{{#invoke:wd|references|Q69678|P1082}}
::&ndash; [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 17:32, 7 June 2024 (UTC)
{{reflist-talk}}
::{{ping|The RedBurn}} Oops, I misread {{tq|1=to not use {{tl|Cite web}} }} in your comment as "to use {{tl|Cite web}}". As for this, we could probably not; see [[Module talk:Wd/Archive 1#Reference formatting bug when using "author name string" (P2093)|this]] discussion. To quote an editor from the discussion: {{tq|1=Titles are required so when <code><nowiki>{{cite web}}</nowiki></code> emits a missing title error, that is a good thing, because someone can go to wikidata and fix it}}.
::As for the change I did (even though it's not what you proposed), what do you think of it?
::–[[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 06:40, 9 June 2024 (UTC)
:::Your change is great, I actually thought {{T|Cite web}} was the culprit for hiding the URL when there's no title. [[User:The RedBurn|The RedBurn]] <small>([[User Talk:The RedBurn|ϕ]])</small> 06:29, 10 June 2024 (UTC)
::::Ok, I went ahead and updated the module. [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 19:18, 10 June 2024 (UTC)
:::::{{ping|Janhrach}} This is a huge improvement, thank you! [[User:Polygnotus|Polygnotus]] ([[User talk:Polygnotus|talk]]) 19:42, 15 June 2024 (UTC)
 
== Wikipedia article link in plain form needed ==
 
While creating a variant template for use on Andhra Pradesh Village articles which uses{{tl| Infobox settlement}}, I needed wikipedia site link text in plain form so that I can change the visible text to remove suffixes in label names like district or mandal. I am unable to do that, as the current linked form gives a full fledged link with site link text and label as its visible text. I am unable to process such text as the response has pipe symbol in it. Is there any other way to get only Wikipedia article link text in plain form? [[User:Arjunaraoc|Arjunaraoc]] ([[User talk:Arjunaraoc|talk]]) 11:18, 21 June 2024 (UTC)
 
:I think this module could not output sitelinks (i.e. interwiki links hosted in Wikidata), linked or not. Could you clarify what exact arguments are you giving to the template call? [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 13:08, 21 June 2024 (UTC)
:[[Template:Sitelink]] or parts of its code? [[User:Ponor|Ponor]] ([[User talk:Ponor|talk]]) 13:42, 21 June 2024 (UTC)
::@[[User:Ponor|Ponor]], Thanks for your help. It worked. I used the corresponding function from {{tl|WikidataIB}} in my code. @[[User:Janhrach|Janhrach]], Your response is correct. I wanted the sitelink in plain text form for the same language, instead of link form with label. [[User:Arjunaraoc|Arjunaraoc]] ([[User talk:Arjunaraoc|talk]]) 00:57, 22 June 2024 (UTC)
 
== {{prop|143}} and {{prop|4656}} in references ==
 
I propose to modify the module to ignore references containing these properties. This seems to be the correct way of handling them – these references should not contain any information useful for Wikipedia references. Any thoughts? [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 15:17, 15 June 2024 (UTC)
 
:@[[User:Janhrach|Janhrach]], Agree. Non Wiki references are only proper references. [[User:Arjunaraoc|Arjunaraoc]] ([[User talk:Arjunaraoc|talk]]) 11:13, 21 June 2024 (UTC)
:I have made the change to the sandbox. References containing {{property|P3452}} are also fully ignored. [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 16:41, 21 June 2024 (UTC)
::{{done}}: module updated. [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 09:49, 23 June 2024 (UTC)
 
== 2 urls in source ==
There are 2 URLs in the source of the 2023 population data on this page: [https://www.wikidata.org/wiki/Q123751?uselang=en#P1082 reference URL] However, one of them appears on Wikipedia. Is it possible for 2 URLs to appear? [[User:Sadrettin|Sadrettin]] ([[User talk:Sadrettin|talk]]) 10:21, 24 June 2024 (UTC)
 
:No, it is not possible for a Wikipedia reference to have two URLs. I am not sure if the Wikidata reference you mentioned is valid; it is possible the reference should be split into two (the first reference would contain the first URL, and the second reference would contain the second URL) even if the other metadata are the same. [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 07:36, 29 June 2024 (UTC)
 
== Update ==
 
I made some substantial changes to the sandbox. I simplified the internal logic of the citation-rendering function and renamed local variables to less cryptic names. No visible behavioral changes changed should happen. Some testcases are [[User:Janhrach/sandbox3|here]]. If there is no opposition to the changes for several days, I will update the main module. [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 19:59, 5 August 2024 (UTC)
 
:{{done}}: module updated. [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 09:50, 9 August 2024 (UTC)
 
== Another update ==
 
I once again altered the internal workings of the citation-rendering function in the sandbox, but also /i18n. Apart from a bugfix, in this update I tried to make much template- and param-specific behavior (previously hardcoded into the function) configurable in /i18n. Changes to /i18n are not backward-compatible. Some testcases are [[User:Janhrach/sandbox3|here]]. [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 18:40, 15 August 2024 (UTC)
 
:Thanks for the info &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 18:46, 15 August 2024 (UTC)
:{{done}}. [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 09:45, 26 August 2024 (UTC)
 
== Reference error message improvement ==
 
Finally, I improved the reference error messages. The code is in the sandbox. <code>/i18n</code> has also been modified. You can see the difference of the outputs [[User:Janhrach/sandbox3|here]]. I appreciate your feedback. [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 17:17, 27 August 2024 (UTC)
 
:{{done}}. [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 17:06, 2 September 2024 (UTC)
 
==Discussion at Template talk:Wikidata entity link § Not picking up mul labels from Wikidata entities==
[[File:Symbol watching blue lashes high contrast.svg|25px|link=|alt=]]&nbsp;You are invited to join the discussion at [[:Template talk:Wikidata entity link#Not picking up mul labels from Wikidata entities|Template talk:Wikidata entity link §&nbsp;Not picking up mul labels from Wikidata entities]]. [[User:Peaceray|Peaceray]] ([[User talk:Peaceray|talk]]) 01:10, 30 August 2024 (UTC)<!-- [[Template:Please see]] -->
 
:@[[User:Thayts|Thayts]], [[User:Janhrach|Janhrach]], et al.: What do you think? I was thinking to change [[Module:Wd#L-704]] from <syntaxhighlight lang=lua inline>label = mw.wikibase.getLabelByLang(id, self.langCode)</syntaxhighlight> to <syntaxhighlight lang=lua inline>label = mw.wikibase.getLabelByLang(id, self.langCode) or mw.wikibase.getLabel(id)</syntaxhighlight> (at least as an interim step). Is this the right thing to do or should we just remove <code>getLabelByLang()</code> all together? Currently it is also being (mis)used at [[Module:Wd#L-1294]] (with a hardcoded "en" for the language). Incidentally this module currently also uses <code>getDescription()</code> (and not <code>getDescriptionByLang()</code>) at [[Module:Wd#L-2523]]. It seems like the language usage (and their fallbacks) is not very unified here. Thank you, —[[User:Uzume|Uzume]] ([[User talk:Uzume|talk]]) 15:11, 30 August 2024 (UTC)
::I am not familiar with the Wikibase API. As for the status quo, it is not good and I already have had to fix a bug arising from a lack of label fallback. I don't know whether <code>getLabel</code> provides a good fallback mechanism, and I don't now have time to check the documentation. (Though maybe tomorrow I will have.)
::As for the {{tq|hardcoded "en"}}, it is required that the language is hardcoded, because the fetched label is used in a Geohack call. (However, I find it much preferable for this string to be fetched from a WD property and not from the label, because in the future, there will be no guarantee that the label will be accepted as a Geohack param.) [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 19:26, 1 September 2024 (UTC)
:::Update: I found the documentation is linked in the linked discussion, so I didn't have to search for it. It seems that it is desirable use getLabel only. There may arise some issues, but they would (in my speculation) only affect multilingual wikis. I will look into this possible bug later. [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 19:36, 1 September 2024 (UTC)
::::The hypothetical bug I have mentioned quite probably won't arise, so ignore this part of the comment. [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 17:53, 2 September 2024 (UTC)
 
===Proposed fix===
I made a fix to the sandbox. Sample output:
*English label:
**live module: {{#invoke:wd|label|Q46}}
**sandbox: {{#invoke:wd/sandbox|label|Q46}}
*Multilingual label:
**live module: {{#invoke:wd|label|Q42}}
**sandbox: {{#invoke:wd/sandbox|label|Q42}}
—[[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 16:36, 8 September 2024 (UTC)
 
:{{done}}. [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 18:29, 12 September 2024 (UTC)
 
== Property mapping and ignoring unrecognized parameters ==
 
I was brought here by the following citation errors which had ''too much information'':
{{collapse top}}
# [[d:Q625794#P569]] {{demo inline|<nowiki>{{wikidata|references|Q625794|P569}}</nowiki>}}
# [[d:Q625794#P570]] {{demo inline|<nowiki>{{wikidata|references|Q625794|P570}}</nowiki>}}
# [[d:Q625794#P20]] {{demo inline|<nowiki>{{wikidata|references|Q625794|P20}}</nowiki>}}
{{reftalk}}
{{collapse bottom}}
 
This is partially just an edit request to add some properties to the property mapping. {{Wikidata property link|P50}} and {{Wikidata property link|P291}} are common citation parameters that need to be added to the property mappings documented at {{slink|Template:Cite Q#Bibliographic parameters}} and {{slink|Template:Wikidata#References}}. I would further map {{Wikidata property link|P136}} to {{para|[[Help:Citation Style 1#Type|type]]}} and {{Wikidata property link|P1433}} to {{para|[[Help:Citation Style 1#Work and publisher|work]]}}.
 
However, I also think that this template/module refusing to produce any citation when there are unrecognized parameters is not ideal. I suggest that it should ignore unrecognized parameters without error messages in published articles, and only show a green warning message on previews.
 
{{small|Pinging {{u|Sdkb}} from their prior interest at {{slink|Module talk:Wd/Archive 1#References mapping}}.}}
 
[[User:Daask|Daask]] ([[User talk:Daask|talk]]) 08:03, 24 September 2024 (UTC)
 
:As for the errors containing {{tq|too much information}}, there were repeated complaints that the previous error message, which only indicated that an error had occured and linked to the documentation, was unclear. And I think too little information is a lesser problem than too much information, especially when there is no middle ground.
:As for the requested mappings, the usage of the mentioned properties in WD refs is not standard per [[wikidata:Help:Sources]].
:Ignoring unknown properties is problematic, because some properties may be deliberately left from the Cite web mapping to force the module to use Cite Q. This will be very important if new output templates are added, which is something I want to do eventually. [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 15:06, 27 September 2024 (UTC)
::{{re|Janhrach}} I apologize for my unclear comment. My concern was not that the error message was verbose, but rather that the error was caused by Wikidata having too much information about the citation. [[User:Daask|Daask]] ([[User talk:Daask|talk]]) 15:36, 27 September 2024 (UTC)
:::I have made some edits to the refs on Wikidata, and I will also modify the module later. [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 18:01, 27 September 2024 (UTC)
::::I have added support for {{prop|P291}} into the Cite web mapping. [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 13:20, 5 October 2024 (UTC)
:::::Why? When citing a web source, that source exists somewhere (or multiple somewheres) on the intarwebs but is not tied to a physical ___location. Just because a box can be filled, it does not mean that it should be filled.
:::::—[[User:Trappist the monk|Trappist the monk]] ([[User talk:Trappist the monk|talk]]) 13:44, 5 October 2024 (UTC)
::::::I added the property because the reference number two above displayed an error, as it contained the P291, which was not in the mapping. Is the usage of "Bloomington" in <code>publication-place</code> in the above reference incorrect? Should all instances of usage like this be removed from Wikidata? [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 13:58, 5 October 2024 (UTC)
:::::::Yes, incorrect. And because you are citing a website, the proper parameter is {{para|website}} not {{para|publisher}}. Wikidata should contain correct data. The problem there is that there are few if any standards so editors will fill-in the boxes because 'omg!-there-is-an-empty-box!-I-must-fill-it!' All that you can do is recognize that and choose {{tlx|cite web}} parameters appropriately.
:::::::—[[User:Trappist the monk|Trappist the monk]] ([[User talk:Trappist the monk|talk]]) 14:12, 5 October 2024 (UTC)
::::::::OK, I fixed the incorrect publication-place properties on WD and reverted my edits to this module. [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 14:24, 5 October 2024 (UTC)
::::::::May I ask why you think ''Kinsley Institute'' should be in <code>website</code>, not in <code>publisher</code>? [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 16:48, 5 October 2024 (UTC)
:::::::::Because we cite the {{em|work}} ({{para|website|Kinsey Institute}} in this case – note spelling) not the publisher (Indiana University).
:::::::::—[[User:Trappist the monk|Trappist the monk]] ([[User talk:Trappist the monk|talk]]) 18:38, 5 October 2024 (UTC)
::::::::::Is the Kinsey Institute a work? It quite seems to match the definition of "publisher" from the Cite web documentation ({{tq|The [[publisher]] is the ''company'', ''organization'' or other legal entity that publishes the work being cited.}}).
::::::::::We could say that we cite the institute's website, which has the same name as the institute. Is this what you mean?
::::::::::(Thanks for the spelling correction; I sometimes misread words and misspell them afterwards.)
::::::::::– [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 12:55, 11 October 2024 (UTC)
 
== Summing values across items ==
 
Hi,
 
I am already using this module to call values for specific items (in my case, political parties, such as their number of members).
 
Is there a way to sum these values for several items that are all instances of an item. For instance, the parties I deal with are all instances of "European political parties", and I am trying to sum their values to display the result (e.g., the sum total number of members of all European political parties).
 
Is these feasible one way or another?
 
Thanks! [[User:Julius Schwarz|Julius Schwarz]] ([[User talk:Julius Schwarz|talk]]) 07:47, 21 October 2024 (UTC)
 
:This is not possible with this module. [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 15:41, 25 October 2024 (UTC)
::Thanks for the reply! And too bad. [[User:Julius Schwarz|Julius Schwarz]] ([[User talk:Julius Schwarz|talk]]) 07:48, 28 October 2024 (UTC)
 
== Capitalisation ==
 
Hi,
Is there a way to change the capitalisation of results? I am trying to call Wikidata to provide the description on Wikipedia articles but Wikidata says descriptions should not be capitalised, while Wikipedia English needs capitalisation. Is there a way to capitalise the first letter of the resulting string?
Thanks! [[User:Julius Schwarz|Julius Schwarz]] ([[User talk:Julius Schwarz|talk]]) 14:16, 9 December 2024 (UTC)
:{{slink|Help:Magic_words|ucfirst}}
:—[[User:Trappist the monk|Trappist the monk]] ([[User talk:Trappist the monk|talk]]) 14:30, 9 December 2024 (UTC)
::I am so bookmarking this. Thanks a lot! [[User:Julius Schwarz|Julius Schwarz]] ([[User talk:Julius Schwarz|talk]]) 15:22, 9 December 2024 (UTC)
 
== Retrieving multiple wikidata property values in one call ==
 
I am trying to retrieve multiple property values in one call but it is ignoring the other properties I give so I only ever get one property value. I must not be giving things in the correct order but none of the examples help me. For example, given a mountain name, I want to retrieve the elevation, prominence, mountain range, coordinates and the first ascent significant event.
So given this:
P4552 = mountain range
P2044 = elevation
P2660 = prominence
P625 = coordinates
P793 = significant event; Q1194369 = first ascent; P585 = point in time
I can get all the values if I code one call per property but how do I code it so I can get all the properties in one call?
The documentation for the "property" command says "Returns the requested property – or list of properties". Yet, I see no example or syntax of how to specify this list of properties.<br/>
 
If I code the following, I only get the value of property P2044.<br/>
<nowiki>{{#invoke:wd|property|qualifier|page=Mount Robson|P2044|P2660|P4552|P625|P793|Q1194369|P585}}</nowiki>
[[User:RedWolf|RedWolf]] ([[User talk:RedWolf|talk]]) 19:32, 23 January 2025 (UTC)
 
:Have you tried using <code>properties</code> instead of <code>property</code>? [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 20:45, 23 January 2025 (UTC)
::Yes, first thing I tried but it's not for specifying multiple properties to return but rather for returning multiple values of the given property. [[User:RedWolf|RedWolf]] ([[User talk:RedWolf|talk]]) 22:04, 23 January 2025 (UTC)
:::It seems that this module does not support this functionality – the diagram at [[Module:Wd#Positional arguments]] apparently says only one <code>property_id</code> argument is supported. The description you quoted from the documentation probably refers to using <code>properties</code>. [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 13:29, 24 January 2025 (UTC)
 
== Retrieve foreign Wikipedia page title ==
 
I want to use the template to retrieve the foreign Wikipedia title of an article, given the local title. As an example: I have 'Eiffel Tower', and I want to retrieve the name '''Eiffelturm''' from the name of the corresponding page on de-wiki, according to the information available at the bottom of page [[d:Q243#sitelinks-wikipedia|Q243]].
 
I am new to the wikidata template, and I have discovered how to do some of what I need to do, for example: I see that <code><nowiki>{{wikidata|label|raw|page=Eiffel Tower}}</nowiki></code> gives me back {{kbd|{{wikidata|label|raw|page=Eiffel Tower}}}}. I see how to get various properties, like where it is located:
* <code><nowiki>{{wikidata|property|page=Eiffel Tower|P17}}</nowiki></code> ⟶ {{wikidata|property|page=Eiffel Tower|P17}}
But I don't see what the property name or id of the foreign wikipedia property is, so I can retrieve the German page title. What I want logically, I think, is something like this, maybe:
* <code><nowiki>{{wikidata|qualifier|page=Eiffel Tower|P99999|de}}</nowiki></code> ⟶ Eiffelturm
where {{kbd|P999999}} is an imaginary property number for 'Wikipedia language link' and {{kbd|de}} is the language code for the foreign Wikipedia containing the title I am looking for. But I can't find a property value for Wikipedia site link. There must be a property or something for the wikipedia names, but I can't find it. Maybe it's not a property, but something else? [[User:Mathglot|Mathglot]] ([[User talk:Mathglot|talk]]) 02:11, 10 March 2025 (UTC)
 
:@[[User:Mathglot|Mathglot]]: [[Template:Sitelink]] or the code within. [[User:Ponor|Ponor]] ([[User talk:Ponor|talk]]) 05:42, 10 March 2025 (UTC)
:: Oh, I forgot about that one, and I even had a hand in writing some of the documentation for it. Thanks! [[User:Mathglot|Mathglot]] ([[User talk:Mathglot|talk]]) 09:53, 10 March 2025 (UTC)
 
== "Multilanguage" not working ==
 
I noticed that the example <code><nowiki>{{wikidata|property|multilanguage|Q55|P1549|P407=Q36846}}</nowiki></code> on [[Template:Wikidata]] no longer works – the output is empty. This seems to happen generally when trying to retrieve language-specific values of P1549 using "multilanguage".
 
Does anyone know how to fix or work around this issue? --[[User:Volvox|Volvox]] ([[User talk:Volvox|talk]]) 18:40, 9 April 2025 (UTC)
 
: {{Reply|Volvox}} It appears that <code>multilanguage</code> itself works, as in the following for the {{Prop|1549}} property of {{Q|55}}.
: <code><nowiki>{{wikidata|property|multilanguage|Q55|P1549}}</nowiki></code> (show one value)
:: {{wikidata|property|multilanguage|Q55|P1549}}
: <code><nowiki>{{wikidata|properties|multilanguage|Q55|P1549}}</nowiki></code> (show all values)
:: {{wikidata|properties|multilanguage|Q55|P1549}}
: I think the problem might be that {{para|P407|Q36846}} as shown in that example is looking for a {{Prop|407}} qualifier containing {{Q|36846}}, which is not how the {{Q|21044568}} datatype stores the language. You can see how it is stored by expanding the following.
{{Collapse|title=Output of <code><nowiki>{{examine|P1549|qid=Q55}}</nowiki></code>|content={{examine|P1549|qid=Q55}}}}
: Not sure if there is a way to fix this without an update to [[Module:wd]]. Perhaps someone having more experience with this module would know. -- [[User:Zyxw|Zyxw]] ([[User talk:Zyxw|talk]]) 03:14, 27 April 2025 (UTC)
 
:: Also, to show it does work when there are {{Prop|407}} qualifiers, see the following for the {{Prop|856}} property of {{Q|7565108}}.
:: <code><nowiki>{{wikidata|property|multilanguage|Q7565108|P856}}</nowiki></code>
::: {{wikidata|property|multilanguage|Q7565108|P856}}
:: <code><nowiki>{{wikidata|property|multilanguage|Q7565108|P856|P407=Q5287}}</nowiki></code> (in {{Q|5287}})
::: {{wikidata|property|multilanguage|Q7565108|P856|P407=Q5287}}
:: <code><nowiki>{{wikidata|property|multilanguage|Q7565108|P856|P407=Q150}}</nowiki></code> (in {{Q|150}})
::: {{wikidata|property|multilanguage|Q7565108|P856|P407=Q150}}
:: To see how this is stored, expand the following.
{{Collapse|title=Output of <code><nowiki>{{examine|P856|qid=Q7565108}}</nowiki></code>|content={{examine|P856|qid=Q7565108}}}}
:: -- [[User:Zyxw|Zyxw]] ([[User talk:Zyxw|talk]]) 03:58, 27 April 2025 (UTC)