Hi,

I think I found an issue when using Pathauto and Redirect modules.
I configured Pathauto that way : when I edit a node title, the node Pathauto alias is changed and the old alias is deleted.
Redirect module catches the old Pathauto alias and generates a redirect.

Example :
with node/6, old alias is "level2-1" and new pathauto alias is "level2-2".
When I create a new node (example node/9) with title "level2-1", Pathauto creates the alias "level2-1" automatically.
But, the redirect "level2-1" to node/6 still exist.
And, when I go to URL "level2-1", I got node/9 and not node/6 like it should be (the redirect "level2-1" to node/6 is still present).

Did somebody already met this issue ?

There may be two possible solutions :
* Either the redirect "level2-1" to node/6 should be deleted
* Either the new pathauto alias takes into account the existing redirect alias ("level2-1") and generates a derivated alias ("level2-1-0").

Thanks for any idea or solution.

Files: 
CommentFileSizeAuthor
#4 pathauto-conflist_with_existing_redirect-1287238-4.patch875 bytesSGhosh
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch pathauto-conflist_with_existing_redirect-1287238-4.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

Comments

nmc’s picture

I've run into this issue as well. Looks like we may need hooks one module or the other so that they can talk to each other when necessary as not everyone may have them both installed.

Brian1234’s picture

This hasn't hit me but looks like it has the potential to (and be a bit tricky to realize what's happening).

Just a bump... it'd be nice for this to get resolved (or if it has been, close this issue).

Thanks!

nagba’s picture

there's a proposed fix on redirect module's side, http://drupal.org/node/1288768#comment-6796086

SGhosh’s picture

Issue summary:View changes
Status:Active» Needs review
StatusFileSize
new875 bytes
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch pathauto-conflist_with_existing_redirect-1287238-4.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

I created this patch for pathauto to remove all redirects(if module exists), after saving new alias.

Status:Needs review» Needs work

The last submitted patch, 4: pathauto-conflist_with_existing_redirect-1287238-4.patch, failed testing.

Pere Orga’s picture

To me, the best Pathauto could do here is to not create an alias if a redirect already exists, warning the user and logging the event.

The root issue is that it's possible to have both and alias and a redirect for the same path, and I can't see a case where this would make sense.

Pere Orga’s picture

Another option is to create the alias as aliasname-0, like Pathauto would do if an alias already exists.

serundeputy’s picture

Issue tags:+pathauto, +301 redirect

I think this is a duplicate of https://www.drupal.org/node/2170259;

the patch there uses the non-destructive solt'n suggested by @Pere Orga

Needs to be tested by the community.

batigol’s picture

Ohhh redirect, global redirect, pathauto, i18n, xml sitemap, it's a loooot of testing and you often don't know witch module cause the problem...