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
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>