Template talk:Wikidata Infobox/Archive 6

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Instruction for adding a sitelink on Wikidata needs update

It says "The category page needs to be linked to through a sitelink on Wikidata (under 'other sites', add the correct sitelink to 'commons')."

However, in wikidata, the section is named "Multilingual sites" not "other sites". Onthewings (talk) 18:49, 5 December 2022 (UTC)

You can change this, if you wish, at Template:Wikidata Infobox/doc — Martin (MSGJ · talk) 18:59, 14 December 2022 (UTC)
This section was archived on a request by: Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 15:42, 21 February 2024 (UTC)

Wikimedia Maps

@Mike Peel: I noticed the infobox at the page Category:Road II/160 (Czech Republic) displays a line of the road in the map, even though the related Wikidata item contains no link to Wikimedia Maps. How it works? Directly through Wikidata:Property:P402?

I suspect, that the infobox displays the linear or area location in the map only if the the location is defined also by any unique point coordinates using Wikidata:Property:P625. IMHO if the spacial data from Wikimedia Maps are available, their display should be not conditioned by Wikidata:Property:P625. ŠJů (talk) 23:54, 20 December 2022 (UTC)

The infobox builds a mapframe (similar to these examples) with the QID of the topic item, which is everything Kartographer needs to retrieve the geodata using the Wikimedia Maps API. Your suspicion that all this only happens if the topic item has a coordinate location (P625) statement is correct since otherwise Module:Wikidata Infobox never calls getCoordinates(). This is done to avoid displaying an empty map if Wikimedia Maps has no data about the topic item, and to avoid useless API calls. You could use the presence of a OpenStreetMap relation ID (P402) statement as a heuristic for the success of the API call, but this would probably complicate the code quite a bit. LennardHofmann (talk) 08:39, 21 December 2022 (UTC)
This section was archived on a request by: Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 15:41, 21 February 2024 (UTC)

Doc-page: description for parameter qid

 Info: This section was moved here from Template talk:Wikidata Infobox/doc. --W like wiki good to know 17:21, 31 January 2023 (UTC)


Hello. It would be nice to mention that the qid parameter includes the initial "Q", or to give an example. I don't think that this is clear. --Strobilomyces (talk) 13:09, 29 March 2020 (UTC)

Documentation is editable. Just do it. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 11:30, 9 April 2023 (UTC)
This section was archived on a request by: Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 15:39, 21 February 2024 (UTC)

Category combines without Wikidata links

@LennardHofmann: Talking with @Multichill: , it would be really useful to be able to call the infobox on combination categories without Wikidata items, like Category:Churches in Overveen, through a call like {{Wikidata Infobox/sandbox|qid=Q16970|qid2=Q1847815}}. It shouldn't be too complex, but needs logic changes to the Lua code - so as well as checking for category combines topics (P971), the infobox should look to see if it's been passed the qid2 parameter and then display information from both items. Do you think this might be feasible? We could then bot-deploy it to quite a few of the 'category combines' categories here that we'll never be able to get dedicated Wikidata items for. Thanks. Mike Peel (talk) 14:50, 19 May 2023 (UTC)

It would also be useful to maintain a easily-accessible list of these -- perhaps an online spreadsheet, or a Commons tabular data file, or a user online database file somewhere -- so anyone wanting the information didn't have to scrape it. Might be useful to set a category for uses, and also a category for <recent change on date X> as a step to helping keeping the list updated. Agree that it would be very valuable, both for making Commons more internationalised and multilingually accessible, and as a means of data acquisition by getting users to document these cats that have no wikidata items. Jheald (talk) 21:32, 19 May 2023 (UTC)
@Mike Peel: I see the use case, but I think the call should be more like {{Wikidata Infobox|qid=none|topics=Q16970,Q1847815}}. Implementing this properly is difficult as the infobox is using the qid parameter everywhere (for auto-categorization, authority control etc.), so I would need to review the entire source code and add if-guards around everything that relies on the connection to a Wikidata item.
It would be much easier to transclude the infobox for every topic separately, as shown here. Of course, this should be done using a new template such as {{Wikidata Infobox Mini|Q16970|Q1847815}}. LennardHofmann (talk) 11:08, 20 May 2023 (UTC)
@LennardHofmann: based on your input I created {{Wikidata Infobox combines topics}} as a simple wrapper template that takes a list of topics. Let's start from there. Multichill (talk) 15:01, 3 June 2023 (UTC)

Add tracker category if category doesn't have enough information

@Mike Peel and LennardHofmann: If Wikidata Infobox links to a category item (for example Category:Paintings in the Rijksmuseum (Q9092805)) and that category item doesn't have category's main topic (P301) or category combines topics (P971) (example), a tracker category should be added here. Name could be something like Category:Uses of Wikidata Infobox no category topic. Multichill (talk) 15:16, 3 June 2023 (UTC)

@Multichill: This is already implemented in the sandbox as Category:Uses of Wikidata Infobox with no topic. @Mike Peel: Can you make the changes live? In the mean time, the following (slow) query does pretty much the same:
SELECT DISTINCT ?item ?article WHERE {
  ?item wdt:P31 wd:Q4167836.
  ?article schema:about ?item ; schema:isPartOf <https://commons.wikimedia.org/> .
  MINUS { ?item wdt:P971 ?topics. }
  MINUS { ?item wdt:P301 ?maintopic. }
}
LIMIT 10
Try it!
LennardHofmann (talk) 11:01, 4 June 2023 (UTC)
@LennardHofmann and Mike Peel: could you plz give some advice on how these cats' topics should be set? Category:Publications of the Smithsonian Institution Category:Writers from Santa Monica, California Category:Ursidae in Sofia Zoo. RZuo (talk) 17:07, 12 July 2023 (UTC)
@RZuo: You want to use category combines topics (P971) for cases like these, example. Thanks. Mike Peel (talk) 21:20, 12 July 2023 (UTC)
This section was archived on a request by: Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 15:38, 21 February 2024 (UTC)

Ladsgroup is questioning on phab (phab:T343131) if this category is necessary, as it is apparently contributing to db bloat. @Mike Peel: Can this be safely removed? What benefit does it provide? —‍Mdaniels5757 (talk • contribs) 17:27, 31 July 2023 (UTC)

@Mdaniels5757: It is currently used in the deployment strategy for the infobox, in particular to get a list of all categories currently using the infobox (which is easy from category inclusion, less obvious for template usage). It would be nice to switch over to having a list of all categories *not* using the infobox, but that's a bit more tricky to access, and is probably still a larger list than those using the infobox. Thanks. Mike Peel (talk) 20:43, 31 July 2023 (UTC)
@LennardHofmann: Related to the discussion going on in the phab ticket, it might be good to switch to using interwiki prefix at Wikimedia (P6720) where available rather than formatter URL (P1630), what do you think? VIAF ID (P214) has both, which might be a good test case. Thanks. Mike Peel (talk) 19:41, 2 August 2023 (UTC)
The module only uses formatter URL (P1630) indirectly via formatStatements() for authority control and I don't plan to change that. Instead, we should try to avoid using external links for the helper links, which are shown at the bottom of every infobox. However, none of the linked sites seem to have interwiki prefixes yet, and the only realistic candidates for proposing new prefixes are Reasonator, Scholia, and locator-tool (the others use lots of URL parameters). LennardHofmann (talk) 07:44, 3 August 2023 (UTC)
@LennardHofmann: It's not the use of P1630 per se that's a problem, but external links. Please see the ticket listed above for details. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 15:38, 5 August 2023 (UTC)
There is an interwiki for toolforge, see [1], but I think it doesn't support variables. Thanks. Mike Peel (talk) 15:45, 5 August 2023 (UTC)
This section was archived on a request by: Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 15:36, 21 February 2024 (UTC)

Start and end time for coordinates

I added at the item Die Badende (Q104725874) new coordinates, because the statue was dislocated. I also added start and end time for the coordinates. But the Wikidata-infobox at Category:Die Badende (Ernst Sauer) shows the old coordinates. Is it possible to show the current ones? Or maybe it would be possible to change the infobox that it's possible to show all coordinates. greetings Z thomas 06:30, 21 November 2023 (UTC)

@Z thomas: You need to deprecate the old coordinates, or mark the new coordinates as preferred. The Infobox doesn't use the start/end time qualifiers, and displaying multiple coordinates would get messy as things currently stand. Thanks. Mike Peel (talk) 15:03, 21 November 2023 (UTC)
Deprecating an historic value would be considered an error on Wikidata. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 19:26, 21 November 2023 (UTC)
@Mike Peel thanks. I will use "preferred". Greetings Z thomas 12:15, 23 November 2023 (UTC)
This section was archived on a request by: Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 15:35, 21 February 2024 (UTC)

Position above lang templates?

https://commons.wikimedia.org/w/index.php?title=Category:Zan_zyu_gai&diff=prev&oldid=824138900

in my opinion it's better to insert the infobox above all the description templates?--RZuo (talk) 08:58, 22 November 2023 (UTC)

@RZuo: The bot inserts the template below the last template inclusion to avoid issues with templates colliding. Feel free to move it like you have here, as you prefer. Thanks. Mike Peel (talk) 20:52, 23 November 2023 (UTC)
This section was archived on a request by: Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 15:34, 21 February 2024 (UTC)

Some sort of wrong synthesis

At Category:Simeon Woods Richardson the infobox links to Category:Minnesota Twins draft picks. He was a New York Mets draft pick, who ended up 2 years later playing for the Twins. I won't mess with the Wikidata content right now: I don't think any thing there is actively wrong (though it is quite incomplete) but something there right now is resulting in this incorrect synthesis. - Jmabel ! talk 21:57, 6 December 2023 (UTC)

@Jmabel: The sitelink for that commons category was in Minnesota Twins (Q604879), which was wrong and overshadowing the link to Category:Minnesota Twins. Now moved to a new item at Minnesota Twins draft picks (Q123692328). Thanks. Mike Peel (talk) 07:41, 7 December 2023 (UTC)
This section was archived on a request by: Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 15:33, 21 February 2024 (UTC)

Lua errors

Category:Pseudomonas aeruginosa has some lua errors ("Lua error: not enough memory."). Please fix or remove the template. Jarekt (talk) 01:47, 29 January 2024 (UTC)

@Jarekt: Fixed by editing Wikidata, @Dhx1: had added 3.8MB(!) of data to a single authority control ID in the property [2], which fairly understandably caused this error. Thanks. Mike Peel (talk) 07:22, 29 January 2024 (UTC)
Thanks, I guess I should have noticed it myself. --Jarekt (talk) 12:53, 29 January 2024 (UTC)
This section was archived on a request by: Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 15:32, 21 February 2024 (UTC)

Text wrap

@Mike Peel and Jean-Frédéric: I noticed a problem with text wrapping. If templates are used in this order:

 
{{Wikidata Infobox}}
{{Cultural Heritage Czech Republic}}

just this morning the text wrap was working but now it's not. The second template is pushed below the bottom edge of the first template. These two templates were not edited directly, apparently something else caused the change. --ŠJů (talk) 21:45, 5 February 2024 (UTC)

It seems to be a browser problem. The bug appears only in Firefox 122.0. In Chrome and Edge, the pages display correctly. --ŠJů (talk) 21:51, 5 February 2024 (UTC)

It was some short-lived problem. Now it is OK. --ŠJů (talk) 07:06, 13 February 2024 (UTC)

This section was archived on a request by: Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 15:29, 21 February 2024 (UTC)

Gambia

de: Diese Infobox erzeugt die Kategorie Category:Women of The Gambia by name, dies ist nicht korrekt, die Schreibweise soll lauten: Category:Women of the Gambia by name. en: This info box creates the category Category:Women of The Gambia by name, this is not correct, the spelling should be: Category:Women of the Gambia by name.

Atamari (talk) 09:11, 12 December 2023 (UTC)

see Category:Women_of_The_Gambia_by_name --Atamari (talk) 09:37, 4 January 2024 (UTC)
The reason for this is probably that The Gambia (Q1005)'s Wikidata label was recently changed. Looking at the enwiki article, the spelling "The Gambia" seems correct. Perhaps the Commons category should be moved? LennardHofmann (talk) 13:05, 5 January 2024 (UTC)
Ich weis auch nicht ob es richtig Category:Women of The Gambia by name oder Category:Women of the Gambia by name geschrieben ist, aber technisch (aus der Vorlage) ist es erstmal falsch gelöst. Leider ist die Schreibweise unterschiedlich gelöst. --Atamari (talk) 14:46, 5 January 2024 (UTC)
Agreed, the capitalization of "the" in "The Gambia" is controversial and it's not very practical to rename dozens of categories. The infobox should be fixed to not rely on the label of The Gambia (Q1005). --LennardHofmann (talk) 19:08, 6 January 2024 (UTC)
see [3] --Atamari (talk) 09:34, 29 January 2024 (UTC)

See also en:The Gambia#Etymology:

The article is ... officially used by the country's government and by international bodies.

-- Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 15:56, 4 February 2024 (UTC)

See also

Category:Women of The Gambia by name and Category:Men of The Gambia by name

--Atamari (talk) 07:48, 13 February 2024 (UTC)

This section was archived on a request by: Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 17:30, 24 February 2024 (UTC)

Add The Gambia as another exception

@Mike Peel: There has been a short, now archived discussion, see Template_talk:Wikidata_Infobox/Archive_6#Gambia where Atamari has asked in German. Recently, he asked again in Commons:Forum, cf. Bitte reparieren (Atamari is obviously very hesitant in asking English requests). Now, Rosenzweig did a deep dive into the Lua code and noticed that there is already an exception defined for the United States of America, so the same should be possible for The Gambia as requested in the archived thread. Please, Mike, as the main developer add this, as well. The reason is apparently that all categories use “the” in lower case (if used), also for The Gambia, and even the module does not look for this in uppercase. And this worked for years, but it seems to be defunct since this edit from December 2023 in Wikidata. — Speravir23:57, 20 March 2024 (UTC)

Hi, I've added a new exception "Q1005 = 'Gambia'," to Module:Wikidata Infobox/sandbox that I think (if deployed) should fix the issue. Best, --Marsupium (talk) 08:58, 21 March 2024 (UTC)
Either that or "Q1005 = 'the Gambia'," with lowercase the. Both should work (if I've understood this right). --Rosenzweig τ 11:44, 21 March 2024 (UTC)
Mike Peel has edited over the past few days, but did not answer here nor did he disagree with Marsupium's proposal. So I've gone ahead and added Marsupium's line to Module:Wikidata Infobox. And apparently it's working, as predicted. --Rosenzweig τ 10:17, 23 March 2024 (UTC)
@Rosenzweig: I've been watching, and waiting for further input by others that commented on this (in opposition) in the past. Normally I make changes in bulk to this template every few months, given how much it is used. Thanks. Mike Peel (talk) 13:54, 23 March 2024 (UTC)
@Rosenzweig and Speravir: It does seem to be working well, though, I've just batch null edited the contents of Category:Women of The Gambia by name and Category:Men of The Gambia by name, and it's moved them all over to the lower case categories (except for one manual category that I've fixed). Thanks for contributing the change (but please do check before making future edits live, so we can bundle changes together). Pinging @Pigsonthewing and LennardHofmann: from the previous conversation here, but if there's still an issue, it should probably go to COM:CfD. Thanks. Mike Peel (talk) 17:15, 23 March 2024 (UTC)
Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment. Mike Peel (talk) 17:15, 23 March 2024 (UTC)

Edit pencil

Hi veryone, on infoboxes in frwiki (usage example: Michel Talagrand) there are little blue edit pencils beside each of the displayed values from Wikidata allowing users to directly jump to Wikidata and edit the values. Couldn't this also be beneficial to have here? Best regards, --Arnd 🇺🇦 (talk) 12:33, 20 March 2024 (UTC)

@Aschroet: I'm not sure. It should be simple to enable it if we wanted, since WikidataIB supports them. However, there was negative feedback on enwiki about them cluttering up infoboxes too much, and there is the direct link to Wikidata at the bottom of the infobox anyway, so I'm not sure if they are needed. Would be interesting to see a wider discussion about this. Thanks. Mike Peel (talk) 17:16, 23 March 2024 (UTC)
Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment. Mike Peel (talk) 21:05, 17 April 2024 (UTC)

Population

Category:Torgau has a strange "Population 19,802 (statistical updating, 9,765, 2022, 10,037)". d:Q12062#P1082 is actually broken down to male and female. RZuo (talk) 16:04, 25 March 2024 (UTC)

Thanks, this has been fixed in the sandbox by suppressing all qualifiers except point in time (P585). Now, it reads "Population: 19,802 (2022)". --LennardHofmann (talk) 10:54, 1 April 2024 (UTC)
@RZuo: This is now live. Thanks. Mike Peel (talk) 21:04, 17 April 2024 (UTC)
Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment. Mike Peel (talk) 21:04, 17 April 2024 (UTC)

Issue with Search Feature on Wikimedia

I conducted a search for "Solar eclipse of 2024 April 8" on Wikimedia.

Expecting a concise and accurate description of the page, I was disappointed by the search results.

Here is the link to the search results

Upon clicking, I found metadata in Hungarian, which is unusual, as the page is new and not previously associated with Hungarian. Additionally, no image is displayed.

Metadata:
Solar eclipse of 2024 April 8
<nowiki>eclipse solar del 8 de abril de 2024; 2024. április 8-i napfogyatkozás; 2024ko apirilaren 8ko eguzki eklipsea; eclipse solar del 8 d'abril de 2024; Sonnenfinsternis...

Could the search feature generate metadata that accurately describes the page's content and include an image from the page?

I posted the issue on Wikipedia first and they sent me here:
It appears that the Commons page that is the first result uses a template called {Wikidata Infobox}. The page description that you are seeing appears to be the names of the corresponding page as listed on Wikidata at d:Q2620078. I don't know why that template on Commons pulls in that data, but you could ask about it at Template talk:Wikidata Infobox.

AceSeeker (talk) 00:53, 13 April 2024 (UTC)

I think the exact purpose of this is that it appears in search results: this allows one to find the category even if they type its name in the search in Hungarian or Esperanto. The missing image is probably independent from this. —Tacsipacsi (talk) 15:39, 14 April 2024 (UTC)
The display of metadata in an unrelated language, along with the presence of code like "<nowiki> 2024ko 8ko," is counterintuitive and needs addressing. This anomaly should be corrected to ensure a more user-friendly search experience. AceSeeker (talk) 16:40, 14 April 2024 (UTC)
Raised at https://phabricator.wikimedia.org/T362495 . The nowiki tag shouldn't be appearing, but the multilingual content is expected since that's deliberately embedded in the gallery/category code by the infobox to aid multilingual search. Thanks. Mike Peel (talk) 19:50, 14 April 2024 (UTC)
Thank you for the clarification Mike. While I understand the intent behind embedding multilingual content to aid searchability, the display of metadata in multiple languages seems unusual compared to typical search engine behavior and may lead to confusion among users.
I'm curious about Wikipedia's search engine functionality. Can it detect languages, use language tagging, or consider user preferences like preferred language or location for more relevant search results?
In the meantime, I'm interested in exploring potential solutions to enhance the metadata page description or contribute to improving the metadata specifically for the reported page or the infobox it uses. Are there any guidelines or best practices I should follow in this regard?
I remain hopeful for a resolution regarding the <nowiki> tag, and I sincerely appreciate the time being spent to address this issue. AceSeeker (talk) 22:08, 14 April 2024 (UTC)
The phab ticket was merged into phab:T331389, I had forgotten that this was previously pointed out. Multilingual support in search is very limited, hence this workaround. It's better to return some results and cause a little confusion, than not return the relevant results at all. Thanks. Mike Peel (talk) 21:00, 17 April 2024 (UTC)

Closing, as it's best to follow this up in the phabricator ticket. Thanks. Mike Peel (talk) 21:03, 17 April 2024 (UTC)

Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment. Mike Peel (talk) 21:03, 17 April 2024 (UTC)