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.

Members fund testing for the Drupal project. Drupal Association Learn more


Elijah Lynn’s picture

1.91 KB
PASSED: [[SimpleTest]]: [MySQL] 316 pass(es). View

Patch attached.

Elijah Lynn’s picture

Status: Active » Needs review
a.ross’s picture

Status: Needs review » Closed (won't fix)

This does not belong in PathAuto. It's the Redirect module that should remove the offending redirect.

Elijah Lynn’s picture

Okay, thanks a.ross.

Elijah Lynn’s picture

Status: Closed (won't fix) » Active
0 bytes

For those who come across this issue here is a patch against Redirect that seems to be working => https://drupal.org/node/1817976#comment-7753335

Elijah Lynn’s picture

Not sure how the above comment had a 0 byte patch attached but please ignore it and just follow the link.

Owen Barton’s picture

Status: Active » Closed (won't fix)