Page MenuHomePhabricator

Commonscat.py checkcurrent
Open, LowPublicBUG REPORT

Description

Originally from: http://sourceforge.net/p/pywikipediabot/bugs/1330/
Reported by: avicennasis
Created on: 2011-08-10 04:57:33
Subject: Commonscat.py checkcurrent
Original description:
When running with -checkcurrent option, I believe the following actions happen.

1\. Check the local link to the Commons category for a match.
1a. If a match is found, do nothing and move on.
1b. If a category redirect is found on Commons, it will ask to \(or -always\) update the link on local wiki.
1c. If neither a category nor a redirect is found, it will scan all the interwiki links from the local wiki page, and see if a Commons category is found on another wiki. If one is found, it will ask to \(or -always\) update the link on the local wiki to match.
1d. If no category link is found at all, it should remove the template. \(Or at least provide an error notice of some kind.\)

Currently, Step 1d doesn't happen.

To duplicate, simply add \{\{commonscat\}\} to any page with no matching category on Commons, then try scanning the page.

The curious thing is it skips \(or doesn't check\) the broken category link. e.g., when Category:Bar doesn't exist at Commons, output is:

Working on Category:Foo
Commonscat template is already on Category:Foo
Commonscat link at Category:Foo to Category:Foo is ok
Working on Category:Bar
Commonscat template is already on Category:Bar
Working on Category:Baz
Commonscat template is already on Category:Baz
Commonscat link at Category:Baz to Category:Baz is ok

python version.py
Pywikipedia \[http\] trunk/pywikipedia \(r9419, 2011/07/23, 11:52:31\)
Python 2.6.5 \(r265:79063, Jun 12 2010, 17:07:01\)
\[GCC 4.3.4 20090804 \(release\) 1\]
config-settings:
use\_api = True
use\_api\_login = True
unicode test: ok


Version: unspecified
Severity: normal
See Also:
https://sourceforge.net/p/pywikipediabot/bugs/1330

Details

Reference
bz55239

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:29 AM
bzimport set Reference to bz55239.
bzimport added a subscriber: Unknown Object (????).

Or, perhaps instead of removing it outright, it could dump a report to the Bot's userspace.

Also, many wikis use \{\{commonscat\}\} in article space as well - -checkcurrent currently only checks category namespace - it should check links in article space as well.

jayvdb set Security to None.
jayvdb removed a subscriber: Unknown Object (????).
Aklapper triaged this task as Low priority.Feb 4 2022, 8:07 PM
Aklapper changed the subtype of this task from "Task" to "Bug Report".