Page MenuHomePhabricator

Bot should always remove CFR template when moving category
Closed, ResolvedPublic

Description

Steps to reproduce

  1. Run python pwb.py category move "category1" "category2"
  2. Bot moves category page to a new name
  3. Bot sometimes removes CFR template from page "category2"

Expected behavior
Bot should always remove CFR template when renaming a category.

Incorrect behavior
Bot tries to remove CFR templates which are not present here and it does this only sometimes. Therefore, it creates new revision just with cosmetic changes. You can see this revision for example. The CFR template remains untouched.

Configuration
last commit of pwb core from gerrit, Python v3.5.2

Event Timeline

btw sometimes bot doesn't make this edit, sometimes it does, but incorrectly in described way.

@Dvorapa Is there a difference between CFR and CFD?

@Urbanecm CRF templates propose categories to be renamed, CFD templates propose their deletion. The command category move doesn't delete the category, just moves it (and then proposes the old version for deletion) and therefore it should remove the CFR templates from the new name and add CFD template to the old name. But sometimes it forgets to add the CFD template (please see T135304); sometimes it forgets to remove CFR template and if it doesn't, it tries to remove CFD template instead.

That behavior my bot randomly adds or removes templates looks a little bit chaotic and empty edits are not good as well.

Dvorapa renamed this task from Bot should remove CFR template when moving category to Bot should always remove CFR template when moving category.Jul 11 2016, 8:21 PM
Dvorapa updated the task description. (Show Details)

Thanks. I looked into the code and there isn't any template in cswiki. Fascinating is in enwiki's section there are both of CFR and CRD templates. From my point of view bot don't know any difference between CFD and CFR.

Dvorapa updated the task description. (Show Details)
Dvorapa claimed this task.

Somebody resolved it

There hasnt been any changes to category.py since April 2016, except for 60d0728a0a8 by @Mpaa. Could that have fixed this bug?

This comment was removed by Dvorapa.
Dvorapa reopened this task as Open.EditedAug 6 2016, 7:37 PM

@jayvdb You are right, this commit added Czech CFR templates in CFD template section and therefore it looks like the task is resolved, but it still isn't. Reopening

Maybe there should be two different variables for CFR and CFD templates (sometimes you want to rename some category but don't want to touch CFD template there)

Dvorapa claimed this task.
Dvorapa updated the task description. (Show Details)

I've hadn't seen this ever again, therefore closing as resolved magically