Steps to replicate error:
1. Create a node and on the node edit/creation form, enter a path 'firstpath'. Save the node.
2. Go to example.com/admin/build/path and observe that firstpath is one of the aliases present.
3. Click on Add Alias and create an additional alias for the same node (with the same language setting), with path 'secondpath'.
4. Test and observe that both example.com/firstpath and example.com/secondpath point to the same node.
5. Now edit that node. Observe that there is still only one path entry. Apparently arbitrarily, it shows the path 'firstpath' since this was created first.
6. Change the path shown to the other one, i.e. change 'firstpath' to 'secondpath', or if 'secondpath' is shown, change it to 'firstpath'.
7. Save the node and observe the error:

user warning: Duplicate entry 'secondpath-en' for key 2 query: UPDATE url_alias SET src = 'node/2', dst = 'secondpath', language = 'en' WHERE pid = 1 in example.com/modules/path/path.module on line 100.

I believe the most sensible solution to this is that the node edit form should show, in the path fieldset, all valid url aliases and allow all of them to be edited (plus perhaps one additional blank one for adding further aliases).

Comments

dave reid’s picture

Status: Active » Closed (works as designed)

It only shows one alias on the node edit form since you should only have one valid path to a node per language. We're looking to add something similar to this in the pathauto moduel.