Page MenuHomePhabricator

Redirect chains will cause issues with DoubleRedirectConstraint.
Open, Needs TriagePublicBUG REPORT

Description

Another minor problem with T326056: Show a warning on creating double redirect:

Steps to replicate the issue:

What happens?:

Note that there's the potential (not yet realised, but wait for it) for a Javascript userscript/gadget automatically updating the target as recommended.

What should have happened instead?:

When [[Foo]] is a redirect to [[Bar]], DoubleRedirectConstraint needs to check that Bar is also not a redirect. If it is, the following error can be thrown:

You are attempting to create a redirect to a double redirect, which would create a redirect chain from {{1}} [i.e. this page] to {{2}} [in e.g. foo] to {{3}} [in e.g. bar] (and potentially further). Please reconsider your edit.

Note there is a similar problem when the target is a broken redirect. Another ticket: T396229: DoubleRedirectConstraint suggests non-existent target if first target was broken redirect.

Event Timeline

Pppery subscribed.

This is deep into https://en.wikipedia.org/wiki/Garbage_in,_garbage_out territory and doesn't need to be handled specially IMO; if the wiki is in an invalid state then you get invalid output.

This is deep into https://en.wikipedia.org/wiki/Garbage_in,_garbage_out territory and doesn't need to be handled specially IMO; if the wiki is in an invalid state then you get invalid output.

Thanks for the comment @Pppery .

Good code is garbage-proof, and errors out on detecting it.