Commons:Wikidata infobox help

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

Over 4 million Commons categories have an infobox on the right-hand side of the page added by the template {{Wikidata Infobox}}.

This shows key information about the topic of the category, drawn directly from Wikidata, with each piece of information automatically available in every language that Wikidata contains a translation for in the relevant language, as well as location maps and links to relevant external authorities; with the blue links in the infobox allowing rapid navigation to relevant related categories.

But the information in the infobox can only be as good, and only as extensive, as the information on the Wikidata item it is drawn from. This page therefore contains some hints for improving the information in Wikidata, to ameliorate the information shown in a Commons category's infobox.

Before we start the FAQ:

  • Some Wikidata terminology:
    • An item or Q-item is comparable to a category, article, etc.
    • A QID: the ID of a Wikidata item; a number with a "Q" prefix.
    • Properties are completely distinct from items, although they are similarly constructed. A property describes the data value of a statement and can be thought of as a category of data, for example color (P462) for the data value blue (Q1088) or education for a person item. Their IDs have a "P" prefix.
    • A statement (or claim) about an item (or a property!) is a property + value. So, properties, when paired with values, form a statement in Wikidata. Statements can be refined with qualifiers and references.
  • When making edits to Wikidata, please, if possible, give a reference. Some likely reference cases for hand-editing are:


Screenshot of linking wikidata to its commons category
  1. Someone added {{Wikidata Infobox}} and it messed up the layout of my category page.
    • {{Wikidata Infobox}} doesn't play well with other templates that want to use the whole page width. Move it down below those, and everything should be fine.
  2. How do I navigate from the infobox to the Wikidata item?
    • Click the pencil "edit" icon in the lower right of the infobox. It takes you to the Wikidata item page. The visual interface is not exactly the same as Commons' wiki interface, but it's similar. You won't exactly be in an edit mode, but you can click any of the many "edit" indications on that page to edit whatever part of it you may want.
  3. Where do I go for Wikidata help?
  4. How is a Commons category linked to a Wikidata item?
    • The mechanism is entirely on the Wikidata side. Naturally, this won't arise as an issue if the Commons category in question already has a Wikidata infobox (unless it's the wrong one!), since that infobox is built by using this linkage.
    • The 'Multilingual sites' section of South Pole Telescope (Q1513315) showing the Commons sitelink to Category:South Pole Telescope.
      To form a sitelink from a relevant Wikidata item to Commons, navigate in Wikidata to the relevant Q-item page (which may be either a "normal" entity or a Wikimedia category item; use the latter if it exists). In the "Multilingual sites" area near the bottom of the Wikidata item page, indicate commonswiki as the wiki, and explicitly enter the Commons category name, with the "Category:" prefix. Any corresponding Wikipedia articles, etc., can be sitelinked in a similar manner
  5. How does {{Wikidata Infobox}} decide what Wikidata item corresponds to a Commons category?
  6. Why does a particular category lack an infobox ?
    • Or alternatively if I add an infobox, why do I see a blank Wikidata infobox with "NO WIKIDATA ID FOUND!"?
    • There are a few possibilities here:
      1. The category should have an infobox, but no one (human or bot) got around to adding the {{Wikidata Infobox}} template yet. If the category already has a sitelinked Wikidata item (look for "Wikidata item" in the left nav) but no Wikidata infobox, this is the most likely answer. Just add the template to the wikitext!
      2. The Wikidata item exists, but the Commons category has never been sitelinked from the Wikidata item. You can sitelink it (see above) and then add {{Wikidata Infobox}} to the category page.
      3. The subject of the category is not notable enough to merit a Wikidata item of its own. E.g. the category describes day 2 of a 3-day event, or a Wikimedian who attended a few conferences but is not really notable, or a particular room of a just-barely-notable building, etc.
      4. The Wikidata item should exist, but doesn't, and needs to be created.
        • A blank Wikidata Infobox
          To start with, add {{Wikidata Infobox}} to the category. It should look like the blank box on the right. Double-check that the Wikidata item doesn't already exist by clicking on the 'Search for...' link - if it does then you only need to add the sitelink. If not, then click on 'Create new Wikidata Item', which will take you to Wikidata to create a new item for the category's topic. It will automatically add the category sitelink. Please also add instance of (P31) and image (P18) at least.
        • As a rule of thumb, Wikidata's threshold of notability is higher than Commons and lower than most Wikipedias. Please don't be offended it you create a Wikidata item for a Commons category and someone decides it is below Wikidata's threshold of notability.
        • Need help on this? You might start with d:Wikidata:Introduction and/or d:Wikidata:Tours.
  7. Why is the wrong Wikidata item linked?
    • For pretty much the same reason there is an error anywhere else: some human or bot got it wrong. Often, a bot will have picked up the bad link from one of the less well-curated Wikipedias.
    • You should, of course, feel free to fix this in Wikidata by correcting sitelinks (see above). NOTE that you will have to remove the Commons sitelink from the wrong Wikidata item before you can add it to the right one: duplicate sitelinks are prohibited.
      • If the correct item already exists, there are basically two ways to find it: search in Wikidata, or find a Wikipedia article for the right topic and look at its Wikidata item (in the left nav).
  8. Why is the map wrong? how do I fix it?
    • If the map is wrong, it's probably because Wikidata has the incorrect geocoordinates. While the syntax for geocoordinates is different from Commons, the principles are pretty much the same. In general, feel free to correct geocoordinates in Wikidata; please provide a reference, if possible. The map coordinates may be rounded using Wikidata's Coordinate location precision value (in decimal degrees); please set an appropriate value.
  9. Why doesn't the text in the infobox specify the location more precisely? (e.g. why just country?)
    • Because the relevant properties are missing from the Wikidata item. This is handled entirely differently for people and for other things, so let's look at the two cases separately. The following is intended to deal with common cases; things get more complicated for things like a painting that might have been painted in one place, depict another place, and be in a museum in a third place.
      1. A thing that has a stable location should typically have the following properties:
        • P17 (country)
        • P131 (located in the administrative territorial entity) : the most specific administrative entity you can tie to the location, assuming you can say something more specific than country. This might be a province, a county, a city, an officially recognized district of a city, etc.
        • P276 (location) : sometimes you can narrow down the location further, but it is not a formal administrative entity. For example, something might be specific to a region of a country (but not to any subnational administrative entity) or to a neighborhood that does not have any formal recognition, or even might fall within a park or a campus.
      2. For humans, this is more complicated. Common geographic properties include:
  10. Why does a blue link in the infobox link to the wrong sort of <X>. For example, it should go to Category:Lions rampant in heraldry and it goes to Category:Panthera leo.
    • Almost certainly, one of the statements for the Wikidata item in question references another Wikidata item, and it references the wrong item. For example, in the Lions rampant in heraldry/Panthera leo case, they are both lions, and someone probably didn't understand that the former has its own Wikidata item ('lion rampant' (Q3241798) vs. 'lion' (Q140)). You can go into Wikidata and correct the incorrect statement.
  11. Why is there unlinked black text for this term rather than a blue link to a Commons category?
    • There are a few possibilities here.
      • Perhaps there is no such Commons category.
      • Perhaps the property value is not a Wikidata item. A date will not be linked, because it comes from a timestamp as a property value rather than a Wikidata item as a property value, so there is no sitelinked Commons category because there is no item from which to sitelink.
      • Perhaps there is such a Commons category, but the relevant Wikidata item doesn't have a sitelink to Commons.
        • To fix this, navigate from the infobox to the Wikidata item; then find the property value that should have a sitelink back to Commons. Click on it to navigate to that Wikidata item; add the sitelink back to Commons (as described above).
  12. Why doesn't it also say <this> about the item? How can I add it?
  13. Why is this bit not showing up in my language, when all the rest is? How do I fix that?
    • Most likely, the Wikidata item that represents this value doesn't have a label in your language. To fix this, navigate from the infobox to the Wikidata item; then find the property value that isn't displaying in your language. Click on it to navigate to that Wikidata item; edit the label accordingly. (While you are at it, you might also want to add a short description and list any "also known as" values. And maybe fill this out for other languages you happen to know.) Normally, you can edit label/description/"also known as" by clicking the (pencil) edit icon at upper right on the Wikidata item page. If that doesn't get you the language(s) you want, you can access all languages with the "Labels list" tool on the top tabs.
  14. I made the correction in Wikidata. Why isn't it showing up in the Commons category?
    • Probably caching somewhere along the line. A null edit to the Commons category (select "Edit" and, without making any changes, "Cancel") will typically fix it.
  15. What properties should be in the Wikidata item for a category that is defined by an intersection of topics?
    • P971 (category combines topics) exists for just this purpose. Typically, you will want to give it two values. See 'Category:Churches in France' (Q7215389) for a good example, producing this result on Commons.
    • Some cases will best be described by three or more values. Expect to get a warning after entering the first value: that will just be the warning that it expects two or more values, and of course when you enter the first one it is in a transient state where it has only one value.
  16. I'd like to help, but I'm much more of a picture person. All this data stuff is intimidating. Or boring.
    Happy hunting!
  17. Any other classic issues people have found? or itches users are going to want to scratch?


Edit meta:Special:Mypage/global.js (check you're logged in first) and add the line:

mw.loader.load("// rand/WikidataInfo.js&action=raw&ctype=text/javascript"); // Backlink: [[d:User:Yair rand/WikidataInfo.js]]

(you can see the source code at d:User:Yair rand/WikidataInfo.js).

This adds the Wikidata ID, label, description and alias (or a "create item" link, if none exists) below the category or article title on Commons and other Wikimedia projects.