Help talk:Property constraints portal/Commons link

From Wikidata
Jump to navigation Jump to search

Namespace parameter

[edit]

@Ivan A. Krestinin: is it correct that the Wikimedia Commons namespace (P2307) parameter is optional? In the extension, omitting the parameter will give you “TODO” results (only displayed on Special:ConstraintReport, not in the user script report) with the message “Check for namespace "" is not yet implemented.”, but I’m not sure if that’s intentional. --Lucas Werkmeister (WMDE) (talk) 13:57, 30 May 2017 (UTC)[reply]

Wouldn’t it be better to encode that as “no value” in the namespace? If a missing Wikimedia Commons namespace (P2307) is only useful for a single property, I don’t think that’s a very useful default value. --Lucas Werkmeister (WMDE) (talk) 10:42, 31 May 2017 (UTC)[reply]
I think I completely misunderstood this parameter. I thought that it would optionally also check that the value has the correct namespace, and if the parameter wasn’t there, the checker would only check that the file exists, regardless of what namespace it has. But if I understand it correctly now, the namespace is actually required, because the value doesn’t contain the namespace, so without the namespace, the checker doesn’t know the full file name that it has to look up.
If this understanding is correct, then I think it makes even more sense to require the parameter. --Lucas Werkmeister (WMDE) (talk) 16:54, 20 June 2017 (UTC)[reply]
Okay, I’ve updated the documentation. Parameter is still optional, because using “no value” for “default namespace” seems weird to me now, but the empty string as value is not allowed. --Lucas Werkmeister (WMDE) (talk) 11:09, 21 June 2017 (UTC)[reply]

Wrong Constraint message

[edit]

In geoshape (P3896) of Segre (Q23145) it shows message "Commons link should be well-formed.", but it is correct; value is Data:Riu Segre.map. Probably the namespace or file tipus are not considered valids, but they are. Thanks,Amadalvarez (talk) 07:38, 26 January 2019 (UTC)[reply]

@Amadalvarez: thanks for the report, I’ve filed a Phabricator task at T214856. --Lucas Werkmeister (WMDE) (talk) 16:47, 28 January 2019 (UTC)[reply]
[edit]

On Audley End House (Q758949) it says "Issues: Commons link constraint: Commons link should exist", but the Commons page has existed since 2016. I removed the Commons Institution page (P1612) property then added it again but the "issues" message returned. I checked other pages with the using the property and it looks like this happens when the page exists in the Institution: namespace but there is no similarly titled page without a namespace prefix, so it could be that the namespace parameter isn't working as intended. Peter James (talk) 21:12, 12 April 2019 (UTC)[reply]

Hm, that might be an unintended consequence of our fix for T219619? Both “Institution:” and “Data:” are namespaces specific to Commons, but in the case of e. g. geoshape (P3896), the namespace is expected to be part of the value, whereas on Commons Institution page (P1612) that’s apparently not the case. So now I’m confused about what the Wikimedia Commons namespace (P2307) parameter actually means :/ --Lucas Werkmeister (WMDE) (talk) 11:42, 15 April 2019 (UTC)[reply]