When I have an existing redirect say 'test' redirecting to node/1 and I rename my node from 'test post' back to 'test' with automatic alias generation turned on. Pathauto correctly sets the alias back to 'test' but does not check for an existing redirect of the same name. This creates an infinite loop, which Redirect does prevent after about 5 loops but nonetheless, the Redirect still happens and is messy.
I believe this fix should go into Pathauto and not Redirect although it could go there instead, please discuss.
I have attached a patch below to remedy this if Redirect is enabled. This builds on lmeurs code snippet from https://drupal.org/node/1796596#comment-7716221 however the patch below is heavily refactored and I set it to use _pathauto_verbose() as well.
|#5||pathauto-infinite-loop-change-alias-existing-redirect-2065091-1.patch||0 bytes||Elijah Lynn|
|#1||pathauto-infinite-loop-change-alias-existing-redirect-2065091-1.patch||1.91 KB||Elijah Lynn|
|PASSED: [[SimpleTest]]: [MySQL] 316 pass(es). |
[ View ]