Page MenuHomePhabricator

Add custom message (similar to delete_redirect_and_move_text) when moving page over a redirect that points back to itself
Open, Needs TriagePublicFeature

Description

Note: This task only affects admins.

Feature summary:
When moving a page to a destination that is already a redirect, this message (delete_redirect_and_move_text) appears:

"The destination page "[[:$1]]" already exists as a redirect. Do you want to delete it to make way for the move?"

However, when moving a page to a destination that is already a redirect pointing back to the source page (e.g., moving "Basque Country (autonomous community)" to "Euskadi" when "Euskadi" redirects to "Basque Country (autonomous community)"), it should display an even more specific message, for example:

"You are moving this page to "[[$1]]", which already redirects here. Delete the redirect to complete the move?"

This replaces the generic delete_redirect_and_move_text message in this specific scenario.

Use case(s):

When administrators want to rename a page to what is currently a redirect pointing to it
Common in cases where an article was created under a name that doesn't follow title conventions, or under a title that has become obsolete.

Benefits:

Clearer indication that this is effectively a page rename operation
Reduces admin uncertainty when performing these moves
Distinguishes between overwriting potentially useful redirects (which requires caution) and redirects that will be replaced by the inverse redirect after the move
Makes the interface more intuitive by providing context-specific messaging

Event Timeline

Aklapper renamed this task from Add custom message (similar to delete_redirect_and_move_text) when moving page over a redirect that points back to itself. to Add custom message (similar to delete_redirect_and_move_text) when moving page over a redirect that points back to itself.Oct 29 2024, 2:08 PM
Pppery subscribed.

The current behavior:

  • Moving over a single-revision redirect to the same page succeeds with no warning
  • Moving over a single-revision redirect to a different page gives the delete_redirect_and_move_text
  • Moving over a multi-revision redirect (to the same or a different page) gives delete_and_move_text. It is a reasonable (but nontrivial) feature request to handle redirects specially even if they have multiple revisions.

I think it might be simpler to pull and specify the target of the redirect, whatever that might be.

I think it might be simpler to pull and specify the target of the redirect, whatever that might be.

I mean a message like:

"The destination page "[[:$1]]" already exists as a redirect to "[[:$2]]". Do you want to delete it to make way for the move?"

OK, so now T426317: Delete-redirect-and-move message should include the redirect's target has been fixed by @Pppery (thanks to him).

This reduces the importance of fixing this bug, but not to zero. But it might I hope provide the basis of a method that might be used for fixing this special case.

Any comments @Pppery ?