Open main menu

Over 2 million Commons categories now have an infobox on the right-hand side of the page added by {{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 improve 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. Their IDs have a "P" prefix.
    • A statement (or claim) about an item (or a property!) is a property + value pair, optionally also qualifier(s) and reference(s).
  • When making edits to Wikidata, please, if possible, give a reference. Some likely reference cases for hand-editing are:

FAQsEdit

  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 'Other 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 "Other sites" area near the bottom of the Wikidata item page, indicate "Commons" 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
    • For that same Wikidata item, P373 (Commons category) should be the same Commons category without the "Category:" prefix, but P373 is less important than the sitelink.
  5. How does {{Wikidata Infobox}} decide what Wikidata item corresponds to a Commons category?
  6. Why does a particular category lack an infobox ?
    • 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 lets 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:
    • Also, as of June 2018, work is in progress on getting the LUA for {{Wikidata Infobox}} to fill in the intermediate locations on the way up from P131 (located in the administrative territorial entity) to P17 (country). Please don't add the redundant values in between: there is a technical fix coming.
  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. 'Panthera leo' (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?
    • Two main possibilities here:
      1. It isn't one of the properties fetched by {{Wikidata Infobox}}. If you think that's in error, you should probably take it up at Template talk:Wikidata Infobox rather than boldly edit such a heavily used template.
      2. The Wikidata item doesn't have that information in a property. To fix this, you can edit the relevant Wikidata item.
  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, either "Publish changes" or "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?

ToolsEdit

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

mw.loader.load("//www.wikidata.org/w/index.php?title=User:Yair 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.