Property talk:P373

From Wikidata
Jump to navigation Jump to search

Documentation

Commons category
name of the Wikimedia Commons category containing files related to this item (without the prefix "Category:")
RepresentsCommons category (Q24574745)
Data typeString
Corresponding templateTemplate:Commons category (Q48029)
Template parametercommons or commonscat in dozens of templates in many languages, such as nl:Sjabloon:Taxobox
DomainNo restriction (note: this should be moved to the property statements)
Allowed values
According to this template: Only existing Commons categories are allowed. The name is without the "Category:" prefix
According to statements in the property:
[^{}\[\]<>]+
When possible, data should only be stored as statements
Usage notes입력할 때 분류명 앞에 붙는 "Category:"는 빼고 쓰세요.
ExampleCalosoma reticulatum (Q569101)Calosoma reticulatum
Gorilla (Q36611)Gorilla
Bangladesh Armed Forces (Q790022)Bangladesh Armed Forces
Formatter URLhttps://commons.wikimedia.org/wiki/Category:$1
Robot and gadget jobsBots should be collecting this based on current template usage. If a category at Commons gets deleted and/or renamed, Wikidata should be updated. The commonscat.py Pywikipedia script should be updated.
Tracking: sameCategory:Commons category with local link same as on Wikidata (Q11925741)
Tracking: differencesCategory:Commons category with local link different than on Wikidata (Q11925740)
Tracking: usageCategory:Commons category link is on Wikidata (Q22914718)
Tracking: local yes, WD noCategory:Commons category not in Wikidata, but available on Wikipedia (Q19821559)
See alsotopic's main category (P910), Commons gallery (P935), Commons Institution page (P1612), Commons Creator page (P1472), content partnership category (P8464)
Lists
Proposal discussionProposal discussion
Current uses
Total3,555,287
Main statement3,545,95299.7% of uses
Qualifier6,2510.2% of uses
Reference3,084<0.1% of uses
Search for values
[create Create a translatable help page (preferably in English) for this property to be included here]
Conflicts with “instance of (P31): Wikimedia template (Q11266439): this property must not be used with the listed properties and values. (Help)
Exceptions are possible as rare values may exist.
List of this constraint violations: Database reports/Constraint violations/P373#Conflicts with, search, SPARQL
Format “(?!:?Category:)[^{}\[\]<>]+: value must be formatted using this pattern (PCRE syntax). (Help)
Exceptions are possible as rare values may exist.
List of this constraint violations: Database reports/Constraint violations/P373#Format, SPARQL
Scope is as main value (Q54828448): the property must be used by specified way only (Help)
Exceptions are possible as rare values may exist.
List of this constraint violations: Database reports/Constraint violations/P373#scope, SPARQL
Single value: this property generally contains a single value. (Help)
Exceptions are possible as rare values may exist.
List of this constraint violations: Database reports/Constraint violations/P373#Single value, SPARQL
Allowed entity types are Wikibase item (Q29934200): the property may only be used on a certain entity type (Help)
Exceptions are possible as rare values may exist.
List of this constraint violations: Database reports/Constraint violations/P373#allowed entity types
Link to Commons namespace “Category”: this property should contain a well-formed link to an existing page on Wikimedia Commons. (Help)
Exceptions are possible as rare values may exist.
List of this constraint violations: Database reports/Constraint violations/P373#Commons link
This property is being used by:

Please notify projects that use this property before big changes (renaming, deletion, merge with another property, etc.)

Constraints[edit]

Pictogram voting comment.svg Commons sitelinks to be copied to P373 property
Items with no P373, but with a category in the Commons sitelink. That category can be saved as P373. (Help)
Violations query: SELECT ?item ?sitelink WHERE { ?item ^schema:about [ schema:isPartOf <https://commons.wikimedia.org/>; schema:name ?sitelink ] . MINUS { ?item wdt:P373 [] } . MINUS { ?item wdt:P31 wd:Q4167836 } . MINUS { ?item wdt:P31 wd:Q4167410 } . FILTER( STRSTARTS( ?sitelink, 'Category:' ) ) . } LIMIT 500
List of this constraint violations: Database reports/Complex constraint violations/P373#Commons sitelinks to be copied to P373 property
Pictogram voting comment.svg Commons sitelinks different from P373 property
Items with sitelinks linking to a different category than the property (Help)
Violations query: SELECT DISTINCT ?item { ?item wdt:P373 ?ccat; ^schema:about [ schema:isPartOf/^wdt:P856 wd:Q565; schema:name ?name ] . FILTER ( STRSTARTS( STR( ?name ), 'Category:' ) ) . FILTER ( STRAFTER( STR( ?name ), 'Category:' ) != ?ccat ) . } LIMIT 7000
List of this constraint violations: Database reports/Complex constraint violations/P373#Commons sitelinks different from P373 property
Pictogram voting comment.svg Two category items linking to the same Commons category
Generally only one category item should link to a Commons category (Help)
Violations query: SELECT DISTINCT ?item ?item2 ?value { ?item wdt:P373 ?value . ?item wdt:P31 wd:Q4167836 . ?item2 wdt:P373 ?value . ?item2 wdt:P31 wd:Q4167836 . FILTER( ?item != ?item2 && STR( ?item ) < STR( ?item2 ) ) . } LIMIT 1000
List of this constraint violations: Database reports/Complex constraint violations/P373#Two category items linking to the same Commons category
Pictogram voting comment.svg Commons category sitelink does not match P373
P373 should generally be the same as the sitelink (Help)
Violations query: SELECT ?item ?commonscat ?sitelink ?name WHERE { ?item wdt:P373 ?commonscat. ?sitelink schema:about ?item; schema:isPartOf <https://commons.wikimedia.org/>; schema:name ?name . FILTER( CONTAINS(STR(?sitelink), 'Category:') = true ) . FILTER( ?commonscat != SUBSTR(STR(?name), 10) ) .} LIMIT 1000
List of this constraint violations: Database reports/Complex constraint violations/P373#Commons category sitelink does not match P373

Discussion[edit]

Context at time of creation[edit]

This property is an intermediate step until we have full Commons support. When we get that we can just convert the data. Up until now Commons category links got updated the interwiki way: Decentral with a lot of efforts, see this page for some statistics. By putting this in a central place we are much more efficient and it doesn't really matter anymore what kind of templates some language Wikipedia use to represent the data. Multichill (talk) 20:44, 30 March 2013 (UTC)[reply]

See Wikidata:Wikimedia Commons for next discussions. --ŠJů (talk) 21:52, 25 April 2013 (UTC)[reply]

English property title[edit]

Hi. I changed "Commons category" to "Wikimedia Commons category", as I think the former is ambiguous and confusing. My edit was undone in this edit as being "too long". I don't understand. Are there length restrictions or guidelines somewhere? --MZMcBride (talk) 16:34, 6 April 2013 (UTC)[reply]

Dear MZMcBride, names here can be ambiguous, that's why we have a description for this property. This is the standard name used in most Wikipedia's and changing it is confusing. Multichill (talk) 18:30, 9 April 2013 (UTC)[reply]
"Wikimedia Commons" seems to be far more popular as an article title than "Commons", looking at Q565. "Commons" is a regular noun in English. That's where the name "Wikimedia Commons" got its name, of course. It seems kind of silly to now associate "Commons" primarily with a file repository. --MZMcBride (talk) 06:43, 12 April 2013 (UTC)[reply]
Capitalized word Commons is not a regular noun in English, the capitalization is adequate distinguishing. --ŠJů (talk) 15:57, 6 August 2013 (UTC)[reply]

Galleries on Commons[edit]

There're a lot of pages in the main namespace on Wikimedia Commons, they are usually galleries and also often contain interwiki. Is there a property for this? If no, I want to create one. Ain92 (talk) 11:27, 12 June 2013 (UTC)[reply]

No, that one hasn't been created yet. Probably has to do with the fact that galleries are much less used than categories on Commons. Commons has 109.210 galleries and 2.727.327 categories. Multichill (talk) 21:45, 13 June 2013 (UTC)[reply]
Proposed at Wikidata:Property proposal/Sister projects#Commons gallery 7 July 2013. --ŠJů (talk) 15:52, 6 August 2013 (UTC)[reply]

Unique value violations[edit]

This should ignore duplicates which are in different namespaces (article/category/portal). JAn Dudík (talk) 09:28, 1 August 2013 (UTC)[reply]

  • Already done, special form {{Constraint:Unique value|separate category processing=yes}} is used. — Ivan A. Krestinin (talk) 20:06, 6 August 2013 (UTC)[reply]

commons:Template:Disambig[edit]

A check of disambiguation pages would be fine, because a commons category link should not be disambig.

It is possible to check this in the database by joining the table page_props on pp_page = page_id and look for rows, where pp_propname = 'disambiguation'. Thanks. 84.182.127.111 13:48, 6 August 2013 (UTC)[reply]

This check can be included in the "Existing category" check. Treat a disambig category as missing and add a hint behind it to see it in the database report. That would be enough, no need for a new check. 84.182.125.23 02:25, 13 August 2013 (UTC)[reply]

commons:Category:Category redirects[edit]

A check if the linked commonscat is a "category redirect" would be fine. 84.182.125.23 18:35, 12 August 2013 (UTC)[reply]

This check can be included in the "Existing category" check. Treat a category redirect as missing and add a hint behind it to see it in the database report. That would be enough, no need for a new check. 84.182.125.23 02:25, 13 August 2013 (UTC)[reply]
This check is included in the "Existing category" already. — Ivan A. Krestinin (talk) 03:22, 13 August 2013 (UTC)[reply]

Next step[edit]

At Wikidata:Property proposal/Generic#Topic main category I proposed a new property that will replace this one over time. Multichill (talk) 19:01, 9 September 2013 (UTC)[reply]

Now that Commons is linked to Wikidata, is it time to get rid of Commons category (P373) entirely? — JFG talk 02:30, 31 October 2013 (UTC)[reply]
See Wikidata:Requests for comment/Commons links. — Ivan A. Krestinin (talk) 04:10, 31 October 2013 (UTC)[reply]
No, too early. This is used a lot and no replacement is available yet. Multichill (talk) 20:40, 31 October 2013 (UTC)[reply]
Just a late comments, interwiki links are for galleries therefore this property is still essential. John F. Lewis (talk) 20:26, 30 January 2014 (UTC)[reply]
Galleries are rare on Commons and most of them look abandoned and out of date. Interwiki link to Commons is enough for me (and it doesn't really matter if it a category or gallery (since they both linked to each other). -- Alexander Vasenin (talk) 22:01, 30 May 2014 (UTC)[reply]

Hindi constraint violation[edit]

When I tried to revert some vandalism in the English label, I received an error about Hindi label constraint violation, so I trimmed the Hindi label, and then could fix the vandalism. John Vandenberg (talk) 09:16, 2 December 2013 (UTC)[reply]

Thanks for fixing this. I repeatedly reported this bug on Wikidata:Contact the development team, but unfortunately the development team does not consider it as bug ?! Mostly there is problem with label in some "exotic" language (like Hindi), that nobody dares to fix, so really thanks. --Jklamo (talk) 11:10, 2 December 2013 (UTC)[reply]
Thanks! I see Wikidata:Contact_the_development_team/Archive/2013/10#Undo_error and Wikidata:Contact_the_development_team/Archive/2013/09#Undo_error. They dont provide a very technical answer :/ All invalid values should be listed so we can fix them early. John Vandenberg (talk) 13:30, 2 December 2013 (UTC)[reply]

Nominated for deletion[edit]

Idiotic to nominate something and not leave a message here. See Wikidata:Properties_for_deletion#Commons_category_.28P373.29. Multichill (talk) 22:20, 10 March 2014 (UTC)[reply]

Kept! -- Lavallen (talk) 12:17, 14 March 2014 (UTC)[reply]
See deletion discussion. - LaddΩ chat ;) 18:56, 17 April 2014 (UTC)[reply]

Nominated with reasoning that information is duplicated: Wikidata:Properties_for_deletion#Commons_category_.28P373.29 Tamawashi (talk) 05:31, 27 June 2014 (UTC)[reply]

WD:PP[edit]

I have proposed a replacement of this property at Wikidata:Property proposal/Sister projects. -- Lavallen (talk) 18:45, 17 March 2014 (UTC)[reply]

Shouldn't be allowed on Category items[edit]

In my opinion, this property shouldn't not be allowed on items which are instance of (P31) Wikimedia category (Q4167836) or any subclass of (P279) it, since those should just use the ordinary interwiki links.

Unfortunately there don't seem to be any appropriate constraint templates. —SamB (talk) 00:10, 25 March 2014 (UTC)[reply]

You're entitled to have you own opinion, but please don't remove these claims because these are in use in several Wikipedias. Multichill (talk) 07:33, 25 March 2014 (UTC)[reply]
Well, they should at least have matching values then. —SamB (talk) 00:16, 26 March 2014 (UTC)[reply]
People are working on that, see Wikidata:Commons category tracking. Feel free to help! Multichill (talk) 08:59, 27 March 2014 (UTC)[reply]

constraint report relating to Wikimedia disambiguation page (Q4167410)[edit]

If instance of (P31) is a Wikimedia disambiguation page (Q4167410) the presence of Commons category (P373) is prohibited

see: Wikimedia disambiguation page (Q4167410) with Commons category (P373) . Usualy there might be more possibilities:
a) Please identify the non - ambiguation page (WD item) where the property Commons category should be moved;
"normally" no other statements should be left at the disambiguation page.
It can happen that a set of properties should be moved to another (a second) WD item, another set to a third WD item etc.
b) (recomended method:) Verify which language is a disambiguation page and separate it from the rest. Please use Gadget-labelLister.js can be activated at preferences#gadgets to remove all faulty (disambiguation) descriptions after the disambiguation page is separated: Verify the descriptions for the following languages: de, en, fr, es, pt, pt-br, ru, sv which where added by bots long time ago and take a short look at the other language descriptions.
c) If method b) can not be used because all linked WMF-project language pages are (local) disambiguation pages please create a new WD item and add a proper description in your native language and in English.

Thanks in advance! gangLeri לערי ריינהארט (talk) 19:53, 4 June 2014 (UTC)[reply]

There are still 979 items found by the query. לערי ריינהארט (talk) 06:00, 23 July 2014 (UTC)[reply]
Hi לערי ריינהארט, what about Wikimedia Commons categories that are disambiguation page ? Cdlt, VIGNERON (talk) 09:00, 19 October 2014 (UTC)[reply]

About external links[edit]

When this property is used in item, why do some have external links to the commons category (e.g. carbon) while others have not (e.g. Africa)? --Neo-Jay (talk) 15:51, 31 July 2014 (UTC)[reply]

It's not a difference in the data; it's a bug in the Wikidata interface that automatically generates external links as a convenience for various properties. The first time you load a Wikidata item page, the properties' values show up as external links; the next time you load a Wikidata item page (regardless of whether it's the same or different page), the links have vanished from the values. At least that's how it's always happened for me. I just did it with carbon (Q623) as you mentioned: The first time I loaded, I got a link; then I refreshed, and the link disappeared. I haven't figured out how long I have to wait or what I have to for the bug to "reset" and show me the links the first time again. --Closeapple (talk) 23:12, 31 July 2014 (UTC)[reply]
I see. Many thanks for your explanation. --Neo-Jay (talk) 05:36, 1 August 2014 (UTC)[reply]
in may opinion the property Commons category (P373) should only be used on Wikidata elements for topics and must be used on Wikidata elements created for Wikimedia categories.
On Wikidata elements for topics:
  • the property P373 must be set to the pagename of the category (without its "Category:" namespace prefix) on Commons where files about this topic are stored;
  • the external links must be pointing only to articles on those wikis about this topic, not to categories on those wikis;
On Wikidata elements for Wikimedia categories:
  • the property P373 must not be used at all (a Wikimedia category is not a valid topic for which Commmons will host any files);
  • the external links must be pointing only to equivalent categories on those wikis (including Commons, Wikipedia, Wikivoyage, Wikinews, Wikisource, Wikispecies, and maybe later Wiktionary with a #anchor to a language or lemma section...). Verdy p (talk) 02:21, 4 April 2016 (UTC)[reply]

P373 "no value"[edit]

Hello! Regarding these constraint violations, would it be possible to have the list of items that use the property 373 with a blank value? --Horcrux92 (talk) 09:41, 1 May 2015 (UTC)[reply]

  • It is possible. but please note, novalue is valid value for this property. It needs to distinct cases "Commons category presence is unknown" and "Commons does not have category for this item". Also novalue is used to avoid invalid values reimport by bots. — Ivan A. Krestinin (talk) 09:51, 1 May 2015 (UTC)[reply]
    Oh, I didn't know that. So I think I won't need that list anymore. --Horcrux92 (talk) 10:03, 1 May 2015 (UTC)[reply]
    @Ivan A. Krestinin: Forget it, it would still be useful (at least for me). --Horcrux92 (talk) 10:15, 1 May 2015 (UTC)[reply]
    The simplest way is new constraint: {{Constraint:Format|pattern=.+}}. — Ivan A. Krestinin (talk) 10:19, 1 May 2015 (UTC)[reply]
    Yes. Can you handle it? --Horcrux92 (talk) 10:52, 1 May 2015 (UTC)[reply]
    Added, this action does not require any special permissions. — Ivan A. Krestinin (talk) 11:42, 1 May 2015 (UTC)[reply]
    Sure, I just didn't know where to do it. Thank you so much, --Horcrux92 (talk) 13:34, 1 May 2015 (UTC)[reply]

Commons category on Wikimedia category item[edit]

Wikidata:Requests for comment/Commons category on Wikimedia category item. FreightXPress (talk) 19:49, 13 May 2015 (UTC)[reply]

Why not linked?[edit]

Why value of this property is not clickable (as link)? IMHO it's necessary to make it clickable and property will be more useful (especially for humans, not only for bots and tools). --XXN, 15:43, 6 February 2016 (UTC)[reply]

It is clickable. Try to reload the page. --Jklamo (talk) 16:04, 6 February 2016 (UTC)[reply]
Oxygen480-emotes-face-uncertain.svg For example in Q3939372 I see Commons category (P373) Rocar De Simon U412 and value "Rocar De Simon U412" is not clickable for me. Only for me? --XXN, 16:27, 6 February 2016 (UTC)[reply]
Works for me, though not always. Be patient, linking it will soon become part of the software. Matěj Suchánek (talk) 16:33, 6 February 2016 (UTC)[reply]
Most of the time it does not work. Sometimes there's a link. I wonder if this happens only on specific instances of hosts deployed (for tests) to serve Wikidata. Verdy p (talk) 02:06, 4 April 2016 (UTC)[reply]
Tested logged out - works; logged in - does not work (never). Probably some gadget or user script is conflicting with it. --XXN, 14:26, 3 December 2016 (UTC)[reply]
  • Thanks to Ladsgroup, I've found the cause of this problem in my case: the gadget "Authority control" was disabled for me and that's why for me the values of P935 and P373 were unlinked. --XXN, 11:17, 18 April 2017 (UTC)[reply]
Links never work for me and a gadget "Authority control" is not available on Special:Gadgets. Any advice? --MB-one (talk) 14:27, 11 March 2018 (UTC)[reply]
The issue is that P373 is a string" property and wikidata does not know it is a link to a page. The issue with "Authority control" was reported in phabricator:T177698 and I proposed phabricator:T179937 to create new property type for linking to pages on Commons. As long as this property remains a string I have little hope that problems with display as string not a link or linking to non-pages will be solved --Jarekt (talk) 02:52, 12 March 2018 (UTC)[reply]