If an alias is replaced by a redirect and then assigned as current alias again, a duplicate is created, in the sense that there is both an alias and a redirect from the same path pointing to the same node.
So whenever an alias of a node is changed or added, the new path needs to be checked for a possibly equivalent redirect. In this case the redirect should probably be re-converted to an alias.

I can think of another case where this is even more problematic: if an already existing redirect "foo" points to node/123 and an alias with the same path "foo" is created to node/234. In this case the user should probably be asked what should be done or at least a helpful error should be thrown.

Comments

dmitriy.trt’s picture

Probably, Redirect should provide a setting for this situation with following options:

  • Remove redirect with the same path as new/updated alias
  • Just notify administrator about this situation with the message

Also, if new/updated alias and existing redirect are equal (the same source/destination, the same language, etc.), the redirect should be removed silently and the setting described earlier should be ignored.

pere orga’s picture

Issue summary: View changes
Status: Active » Closed (duplicate)