The following discussion is an archived debate. Please do not modify it. To request review of this BRFA, please start a new section at WT:BRFA. The result of the discussion was  Approved.

Operator: Mike Peel (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)

Time filed: 20:21, Tuesday, January 1, 2019 (UTC)

Function overview: Fix or remove commons category links that are missing, or are to category redirects or disambiguation categories

Automatic, Supervised, or Manual: Automatic

Programming language(s): python (pywikibot)

Source code available: on bitbucket

Links to relevant discussions (where appropriate): Template_talk:Commons_category#The_next_steps_with_this_template_and_Wikidata (and threads below that)

Edit period(s): Daily

Estimated number of pages affected: Of order 10,000 to start with, maybe around 10 per day afterwards

Namespace(s): Articles and categories

Exclusion compliant (Yes/No): No

Function details: The bot looks through the contents of the maintenance categories at Category:Commons category link is locally defined and Category:Commons category link is defined as the pagename (which track differences between local commons sitelinks and those on wikidata) to find cases where the locally defined category links are to non-existent categories (then either removing the commons category completely, e.g. [1], or removing the local definition to use the commons sitelink from Wikidata, e.g. [2]), or are to category redirects or disambiguation categories (then removing the local link if the redirect/disambig page points to the commons sitelinked category).

Discussion

[edit]

((BAG assistance needed))

@Mike Peel: Just to make sure I understand, this is:
  1. removing the template entirely if the target Commons category is non-existent and no Commons category is available through Wikidata
  2. removing the local parameter but leaving the template if the target Commons category is non-existent and a Commons category is available through Wikidata
What exactly happens for redirects and disambiguation pages? ~ Rob13Talk 17:20, 14 January 2019 (UTC)[reply]
@BU Rob13: Thanks for the comment! Your understanding of (1) and (2) is correct. (2) would also apply for redirects and disambiguation pages. Thanks. Mike Peel (talk) 17:31, 14 January 2019 (UTC)[reply]
Isn't it more desirable to replace the local parameter with the redirect target for redirects and leave it for human review for the disambiguation page? ~ Rob13Talk 17:59, 14 January 2019 (UTC)[reply]
@BU Rob13: We currently have a mix of links with local parameters and those without (see tracking at Category:Commons category Wikidata tracking categories), I'm hoping that can be standardised at some point soon but that needs an RfC first. It's easier to simply remove them for now (and that also means that they'll automatically update if needed in the future, rather than the bot having to do so here), but I can modify the code to write the local link if needed. It's easy to disable the code that handles disambiguation pages if you'd prefer, that can be revisited later if needed. Thanks. Mike Peel (talk) 18:23, 14 January 2019 (UTC)[reply]
The basic problem is that we don't want to preempt the RfC by removing local parameters that are currently useful. I personally agree with standardizing this one way or the other, but that's a decision for the community. If one is sent to a redirect category on Commons, they can click through to the actual category, so I would regard that as useful. Same with disambiguation categories, since they could feasibly be replaced with the appropriate category that they should be disambiguated to. Removing non-existent categories, on the other hand, is a simple maintenance task that is certainly useful. Let's turn off the disambiguation for now, at least until there's a consensus to do something else with them somewhere. For the redirects, that can either be turned off or the categories can be replaced with the redirect's target category. Once those edits to the code are done, let me know and I'll approve for trial. ~ Rob13Talk 18:28, 14 January 2019 (UTC)[reply]
@BU Rob13: I've modified the code to disable the disambiguation code, and to substitute the new commons link into the wikitext - see the latest version on bitbucket. Please let me know if you want any other changes/tweaks making before trial. Thanks. Mike Peel (talk) 18:54, 14 January 2019 (UTC)[reply]
The above discussion is preserved as an archive of the debate. Please do not modify it. To request review of this BRFA, please start a new section at WT:BRFA.