pathauto 6.x-1.3, Drupal 6.16 (other modules are mostly the Acquia distribution). Before you call SEO-foul, hear me out.

When pathauto is set to "Create a new alias. Delete the old alias"... If there are multiple aliases to the node, which alias does it delete? The newest? The oldest? All? I did a test.

Example is node/35, path pattern is [title-raw]

First, I had one alias:
alias-name-1

Then, pathauto was set to "Create a new alias. Leave the existing alias functioning" and I renamed the node title. Now there were two aliases pointing to node/35:
alias-name-1 (created first)
alias-name-2 (created second, by pathauto)

Next, I switched to "Create a new alias. Delete the old alias".

I changed the title of the node again, thus creating:
alias-name-3

... and checked admin/build/path/list, expecting that the most recent alias-name-2 was deleted, leaving alias-name-1 and alias-name-3.

But instead, it deleted alias-name-1 ! This isn't the expected behavior. It should check to see which is the current alias before deciding which to delete.

Unless, of course, I'm missing something...

Comments

silentway’s picture

Category: bug » support

Then I ran the test again and it DID delete the most recent alias as expected... hmmm... what criteria does it use to determine which alias will be deleted?

When there are multiple aliases to the same node, does pathauto differentiate between them?

dave reid’s picture

Status: Active » Fixed

It selects the alias to remove/delete in _pathauto_existing_alias_data().

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.