Page MenuHomePhabricator

[DOT] Perform necessary redirect after creating temporary account in merge/redirect special pages
Closed, ResolvedPublic

Description

Per the parent task, special pages that make edits may need to redirect the visitor to a central login wiki if the edit created a temporary account. This presents a problem for three special pages:

  • Special:RedirectEntity
  • Special:MergeItems
  • Special:MergeLexemes

All three of them show a simple message on success.

image.png (418×766 px, 24 KB)

But if we need to redirect, we need to have something for the redirect to return to, once the CentralAuth login magic is done. I think we have two options:

  1. Create a new URL state for the special page that can be returned to, e.g. Special:RedirectEntity/success/Q1/Q2 or Special:RedirectEntity?fromid=L1&toid=L2&success=true, which shows the same message as before. (IMHO it’s not important to actually authenticate / validate this state, i.e. check that such an edit was made. If someone manually puts together a “success” URL with entity IDs they didn’t actually edit, and makes the software show a technically incorrect “X was redirected to Y” message… good for them.)
  2. Redirect to something else after all, e.g. the target page of the redirect/merge, or the diff of the last edit that was made. (Note that the “merge” special pages make more than one edit on more than one entity, so technically isn’t a single diff we can link to.)

(I originally had the first option in mind, but the second one feels more attractive to me right now. But that’s a product decision to make.)

Event Timeline

For what it’s worth, I don’t see any particular explanation in T87114 or the attached Gerrit change why Special:RedirectEntity shows a success message rather than redirecting to the result. (I’m assuming Special:MergeItems and Special:MergeLexemes took the behavior from Special:RedirectEntity.) From what I can tell, it could have been an arbitrary choice that we should feel free to change now. (But I might be wrong ^^)

Do I understand the options correctly?

Option 1:

  1. I go to Special:RedirectEntity while not logged in
  2. I enter the IDs to redirect from/to
  3. I click "Redirect"
  4. I get redirected to central log-in wiki
  5. I get send back to Special:RedirectEntity with some special parameters
  6. The edit is made for me under the temp user name

and then? 🤔

Option 2:
Same as above and then

  1. I get redirected to the redirect target entity

Not quite. These steps are the same in both options:

  1. Go to Special:RedirectEntity while not logged in
  2. enter the IDs to redirect from/to
  3. click "Redirect"
  4. edit is made under the temp user name
  5. get redirected to central log-in wiki
  6. temp user name is ✨made more persistent✨ in CentralAuth (I don’t really understand the details tbh ^^)

And then option 1 is:

  1. get sent to Special:RedirectEntity with some special parameters, to show “X was redirected to Y”
  2. if you want, you can now go to the items that were recreated (though in Special:RedirectEntity the message doesn’t actually link to the items ^^ in Special:MergeItems it does), or redirect another pair of entities (go back to step 1)

and option 2 is:

  1. get sent to the Y item, or a diff view, or something else
  2. if you want to do another pair of redirects, you have to go back to Special:RedirectEntity

Gotcha! Thanks.
Ok right now Special:Merge does the redirect edits and then shows you the following:

image.png (410×852 px, 37 KB)

I think we don't want to have different behaviour in this between temporary accounts and proper accounts. So I'd say we either do send them back to Special:Merge and show the message or we change it for everyone to redirect to the merge target. The message seems a bit more useful to me to make it clear that the merge has actually succeeded.

I think we don't want to have different behaviour in this between temporary accounts and proper accounts. So I'd say we either do send them back to Special:Merge and show the message or we change it for everyone to redirect to the merge target.

Yeah, what I had in mind was changing it for everyone, not just temporary accounts.

The message seems a bit more useful to me to make it clear that the merge has actually succeeded.

Alright, then we can add a success state to the special page.

Lucas_Werkmeister_WMDE renamed this task from Perform necessary redirect after creating temporary account in merge/redirect special pages to [DOT] Perform necessary redirect after creating temporary account in merge/redirect special pages.Feb 9 2024, 2:34 PM
Arian_Bozorg claimed this task.
Arian_Bozorg subscribed.

This looks good to me, thanks so much!