Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
In the page /admin/build/path/pathauto, if I check "Bulk generate aliases for terms that are not aliased" in the "Taxonomy term path settings" section, I have a "Duplicate entry" error:
* Les options de configuration ont été enregistrées.
* Mise à jour en masse des termes terminée ; 6 alias générés.
* user warning: Duplicate entry 'taxonomy/term/1' for key 2 query: INSERT INTO drupal_path_redirect (path, redirect, query, fragment, type) VALUES ('taxonomy/term/1', 'taxonomy/term/', '', '', '301') in /var/alternc/html/drupal/sites/all/modules/path_redirect/path_redirect.module on line 144.
* user warning: Duplicate entry 'taxonomy/term/2' for key 2 query: INSERT INTO drupal_path_redirect (path, redirect, query, fragment, type) VALUES ('taxonomy/term/2', 'taxonomy/term/', '', '', '301') in /var/alternc/html/drupal/sites/all/modules/path_redirect/path_redirect.module on line 144.
* user warning: Duplicate entry 'taxonomy/term/3' for key 2 query: INSERT INTO drupal_path_redirect (path, redirect, query, fragment, type) VALUES ('taxonomy/term/3', 'taxonomy/term/', '', '', '301') in /var/alternc/html/drupal/sites/all/modules/path_redirect/path_redirect.module on line 144.
* user warning: Duplicate entry 'taxonomy/term/4' for key 2 query: INSERT INTO drupal_path_redirect (path, redirect, query, fragment, type) VALUES ('taxonomy/term/4', 'taxonomy/term/', '', '', '301') in /var/alternc/html/drupal/sites/all/modules/path_redirect/path_redirect.module on line 144.
* user warning: Duplicate entry 'taxonomy/term/5' for key 2 query: INSERT INTO drupal_path_redirect (path, redirect, query, fragment, type) VALUES ('taxonomy/term/5', 'taxonomy/term/', '', '', '301') in /var/alternc/html/drupal/sites/all/modules/path_redirect/path_redirect.module on line 144.
Here's my config:
- Drupal 6.9
- Pathauto 6.x-1.1
- Path Redirect 6.x-1.0-beta1
Comments
Comment #1
Dave ReidPlease upgrade to the latest versions of pathauto and path_redirect and let me know if the problem continues.
Comment #2
Jean-Philippe Fleury CreditAttribution: Jean-Philippe Fleury commentedHi,
I've updated and I've still a message error:
My new config:
Comment #3
Dave ReidMake sure you are also using the latest version of pathauto, which is the 6.x-1.x-dev version.
This is a pathauto bug, duplicate of #278368: taxonomy_term_path being passed TID instead of Term Object.
Sorry greggles, hope you don't mind I keep moving these ones over to the pathauto issue queue.
Comment #4
Jean-Philippe Fleury CreditAttribution: Jean-Philippe Fleury commentedOK, yes I confirm that with pathauto-6.x-1.x-dev, the bug is no longer there.
Thanks.
Comment #5
MountainX CreditAttribution: MountainX commentedI did a bulk update of taxonomy terms and I got these errors in Drupal 6.12 with Pathauto 6.x-1.1 and Global Redirect 6.x-1.2.
If I install pathauto-6.x-1.x-dev, do I need to re-run the bulk update? Has any data been lost?
* user warning: Duplicate entry 'taxonomy/term/62-' for key 2 query: UPDATE url_alias SET src = 'taxonomy/term/', dst = 'taxonomy/term/62', language = '' WHERE pid = 90 in /var/www/drupal/modules/path/path.module on line 100.
* user warning: Duplicate entry 'taxonomy/term/63-' for key 2 query: UPDATE url_alias SET src = 'taxonomy/term/', dst = 'taxonomy/term/63', language = '' WHERE pid = 90 in /var/www/drupal/modules/path/path.module on line 100.
* user warning: Duplicate entry 'taxonomy/term/70-' for key 2 query: UPDATE url_alias SET src = 'taxonomy/term/', dst = 'taxonomy/term/70', language = '' WHERE pid = 90 in /var/www/drupal/modules/path/path.module on line 100.
* user warning: Duplicate entry 'taxonomy/term/71-' for key 2 query: UPDATE url_alias SET src = 'taxonomy/term/', dst = 'taxonomy/term/71', language = '' WHERE pid = 90 in /var/www/drupal/modules/path/path.module on line 100.
* user warning: Duplicate entry 'taxonomy/term/77-' for key 2 query: UPDATE url_alias SET src = 'taxonomy/term/', dst = 'taxonomy/term/77', language = '' WHERE pid = 90 in /var/www/drupal/modules/path/path.module on line 100.
* user warning: Duplicate entry 'taxonomy/term/80-' for key 2 query: UPDATE url_alias SET src = 'taxonomy/term/', dst = 'taxonomy/term/80', language = '' WHERE pid = 90 in /var/www/drupal/modules/path/path.module on line 100.
* user warning: Duplicate entry 'taxonomy/term/82-' for key 2 query: UPDATE url_alias SET src = 'taxonomy/term/', dst = 'taxonomy/term/82', language = '' WHERE pid = 90 in /var/www/drupal/modules/path/path.module on line 100.
* user warning: Duplicate entry 'taxonomy/term/84-' for key 2 query: UPDATE url_alias SET src = 'taxonomy/term/', dst = 'taxonomy/term/84', language = '' WHERE pid = 90 in /var/www/drupal/modules/path/path.module on line 100.
* user warning: Duplicate entry 'taxonomy/term/88-' for key 2 query: UPDATE url_alias SET src = 'taxonomy/term/', dst = 'taxonomy/term/88', language = '' WHERE pid = 90 in /var/www/drupal/modules/path/path.module on line 100.
* user warning: Duplicate entry 'taxonomy/term/98-' for key 2 query: UPDATE url_alias SET src = 'taxonomy/term/', dst = 'taxonomy/term/98', language = '' WHERE pid = 90 in /var/www/drupal/modules/path/path.module on line 100.
* user warning: Duplicate entry 'taxonomy/term/99-' for key 2 query: UPDATE url_alias SET src = 'taxonomy/term/', dst = 'taxonomy/term/99', language = '' WHERE pid = 90 in /var/www/drupal/modules/path/path.module on line 100.
* user warning: Duplicate entry 'taxonomy/term/104-' for key 2 query: UPDATE url_alias SET src = 'taxonomy/term/', dst = 'taxonomy/term/104', language = '' WHERE pid = 90 in /var/www/drupal/modules/path/path.module on line 100.
and many more...
UPDATE: I installed pathauto-6.x-1.x-dev and re-ran the bulk update. It reported 0 terms aliased and it showed no errors. I'm still not 100% sure that no damage was done previously, but everything seems OK now...
Comment #6
Mr Hamster CreditAttribution: Mr Hamster commentedI have installed pathauto-6.x-1.x-dev but i still have errors. I have them when i drag term up or down and save configurations
Comment #7
rootworkI'm seeing this too. Even with the 1.x-dev version of pathauto, I get these errors. I'm running D6.13 as well.
Comment #8
gregglesThe dragging/saving is an interesting variation, but I haven't tested/confirmed it. Could you provide a simpletest that demonstrates the problem? That would help in debugging it.
Comment #9
HnLn CreditAttribution: HnLn commentedI get this on saving a node after editing it (Duplicate entry 'taxonomy/term/x ... path/path.module on line 100). Although the error is thrown by path.module, disabling pathauto makes it go away.
In my particular case I have a hook_nodeapi that creates and saves a term with taxonomy_save_term when a node is inserted or updated (on insert it creates a term, on update it overwrites the existing one to ensure the term name corresponds with the node title). Commenting out taxonomy_save_term also makes it go away.
I coded around the problem by checking if the term name is different when saving after edit and only call taxonomy_save_term when it is. I would prefer this check to be done by pathauto or path though :-). Not sure who is responsible.
HnLn
Comment #10
pcorbett CreditAttribution: pcorbett commentedI can confirm this as well. It seems to only happen with a specific parent/child pair of taxonomy terms I edit - not sure yet what is so special about them. I have not tried 1.x-dev yet. Disabling pathauto fixes the issue. The error looks like this:
Greggles, ping me if you want me to show you exactly what's happening. Sorry I don't have time to dive in and figure out exactly what's going on...
Comment #11
Bartezz CreditAttribution: Bartezz commentedsubscribing
Comment #12
Drupal webdesigner CreditAttribution: Drupal webdesigner commentedSinds i update tha path auto, when i update my path's it doesn't change. The error it gave is gone when i updated to dev 2.x but i still doesn't work.
Anyone?
Comment #13
gildor CreditAttribution: gildor commentedAfter update to dev build, you must delete all existing aliases and then create new aliases (example in pathauto page). This solves the problem
Comment #14
andrewz CreditAttribution: andrewz commentedI also get the "duplicate entry" (Drupal 6.13, pathauto 6.x-1.1) when editing existing URLs. Could this possibly be to blame for Drupal randomly transforming valid URLs to invalid URLs as I reported http://drupal.org/node/571116 ?
Comment #15
mediamash CreditAttribution: mediamash commentedis there a solution yet for this issue?
Comment #16
tevih CreditAttribution: tevih commentedsubscribe
Comment #17
omri100 CreditAttribution: omri100 commentedsubscribe
Comment #18
apodic CreditAttribution: apodic commentedSubscribe
Comment #19
fletch11 CreditAttribution: fletch11 commentedsubscribe
Comment #20
stoptime CreditAttribution: stoptime commentedsubscribe
Comment #21
m.sant CreditAttribution: m.sant commentedsubscribe