Page MenuHomePhabricator

category with move action should not save a soft redirect
Closed, ResolvedPublicFeature

Description

category.py with 'move' action deletes the source category by default but it saves a soft-redirect first and adds a speedy deletion template afterwards (which are two edits)

The default should

  • move without leaving redirects if this right is available - or
  • move with keeping the source and
    • delete them if this right is available
    • tag the sd template otherwise

The edits may be shown at https://test.wikipedia.org/w/index.php?title=Category:Testmoved&action=history

Event Timeline

Xqt triaged this task as Medium priority.Nov 5 2016, 4:17 PM

Change 498696 had a related patch set uploaded (by JJMC89; owner: JJMC89):
[pywikibot/core@master] [IMPR] Move categories without leaving a redirect

https://gerrit.wikimedia.org/r/498696

Xqt changed the subtype of this task from "Task" to "Feature Request".Mar 24 2019, 4:12 AM

I'm moving this discussion from Gerrit to the task.

@Dvorapa wrote:

@Xqt wrote:

@JJMC89 wrote:

@Dvorapa wrote:
In movepages.py we use -noredirect param. Perhaps we should use it here as well?

The task asks for it to be the default. An inverse parameter like -nodelete could be added if needed. Naming it -nonoredirect seems odd though.

I am fine with a -noredirect param but placing a soft redirect and set a speedy deletion template after this is nonesense. The result of the current implementation is having no redirect (without any parameter). The opposite could be -softredirect to keep that template if a wiki has it (e.g. de-wiki does not allow soft redirects on categories).

I mean, do we need leaving soft redirect for categories? (that was what I tried to ask before; anyway -softredirect, -nodelete, -leaveredirect or whatever similar should be fine)

The logic for user that can move categories (move-categorypages) looks something like:

  1. If -nodelete is specified (delete_oldcat=False), keep a redirect.
  2. Else if the user has the suppressredirect right, then use noredirect when moving the category to not leave a redirect.
  3. Else if the user has the delete right, delete the redirect left behind after the move.
  4. Else, tag the redirect with {{delete}}.

Do we want a -leaveredirect option? It would make the logic something like:

  1. If -nodelete is specified (delete_oldcat=False), keep a redirect.
  2. Else if -leaveredirect is specified, keep a redirect.
  3. Else if the user has the suppressredirect right, then use noredirect when moving the category to not leave a redirect.
  4. Else if the user has the delete right, delete the redirect left behind after the move.
  5. Else, tag the redirect with {{delete}}.

Unless I'm missing something, it wouldn't be different than use the existing -nodelete if you want to keep the redirect.

To me the first option seems reasonable

To me the first option seems reasonable

Ok, my patch follows that.

Change 498696 merged by jenkins-bot:
[pywikibot/core@master] [IMPR] Move categories without leaving a redirect

https://gerrit.wikimedia.org/r/498696