https://bugzilla.wikimedia.org/show_bug.cgi?id=55221
Web browser: --- Bug ID: 55221 Summary: category.py mistakenty removes not affected categories Product: Pywikibot Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: Unprioritized Component: category.py Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: legoktm.wikipedia@gmail.com Classification: Unclassified Mobile Platform: ---
Originally from: http://sourceforge.net/p/pywikipediabot/bugs/1396/ Reported by: xqt Created on: 2012-01-15 16:26:09 Subject: category.py mistakenty removes not affected categories Original description: Pywikipedia trunk/pywikipedia/ (r9826, 2011/10/30, 15:03:29) Python 2.7.2 (default, Jun 12 2011, 14:24:46) [MSC v.1500 64 bit (AMD64)] config-settings: use_api = True use_api_login = True unicode test: ok
I found some categories removed on template which are not affected by the command line:
category.py remove -from:Kategorie:Vorlage:mit_Einzelnachweisen
Here is a sample: http://de.wikipedia.org/w/index.php?title=Vorlage%3AInfobox%5C_Gemeindeverba...
cosmetic_changes was switched off.
https://bugzilla.wikimedia.org/show_bug.cgi?id=55221
--- Comment #1 from Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com --- I changed the behavour of catlib.change_category(). Categories of templates always are always replaced by wikipedia.replaceCategoryInPlace() rather than by wikipedia.replaceCategoryLinks().
The bug ist still remainig for some circumstances: Page.categories() gives categories via api whereas replaceCategoryLinks() works like wikipedia.getCategoryLinks() which is quite different.
https://bugzilla.wikimedia.org/show_bug.cgi?id=55221
--- Comment #2 from Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com --- - **priority**: 5 --> 3
https://bugzilla.wikimedia.org/show_bug.cgi?id=55221
--- Comment #3 from Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com --- I made some experiments. I think the problem is in textlib.py. replaceCategoryLinks calls removeCategoryLinksAndSeparator
I suspect that removeCategoryLinksAndSeparator removes these categories but nobody puts them back because they are not explicitely listed as categories.
https://bugzilla.wikimedia.org/show_bug.cgi?id=55221
Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://sourceforge.net/p/p | |ywikipediabot/bugs/1396
https://bugzilla.wikimedia.org/show_bug.cgi?id=55221
Amir Ladsgroup ladsgroup@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Priority|Unprioritized |High CC| |ladsgroup@gmail.com
https://bugzilla.wikimedia.org/show_bug.cgi?id=55221
Mpaa mpaa.wiki@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |mpaa.wiki@gmail.com Resolution|--- |DUPLICATE
--- Comment #4 from Mpaa mpaa.wiki@gmail.com ---
*** This bug has been marked as a duplicate of bug 55315 ***
pywikipedia-bugs@lists.wikimedia.org