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

Dave Reid’s picture

Status: Active » Postponed (maintainer needs more info)

Please upgrade to the latest versions of pathauto and path_redirect and let me know if the problem continues.

Jean-Philippe Fleury’s picture

Hi,

I've updated and I've still a message error:

Les options de configuration ont été enregistrées.
Mise à jour en masse des termes terminée ; 2 alias générés.

user warning: Duplicate entry 'taxonomy/term/16-' for key 2 query: INSERT INTO drupal_path_redirect (path, redirect, language, type, last_used) VALUES ('taxonomy/term/16', 'taxonomy/term/', '', 301, 1237060805) in /var/alternc/html/drupal/includes/common.inc on line 3422.

My new config:

  • Drupal 6.10
  • Pathauto 6.x-1.1
  • Path Redirect 6.x-1.0-beta3
Dave Reid’s picture

Project: Path redirect » Pathauto
Version: 6.x-1.0-beta1 » 6.x-1.1
Status: Postponed (maintainer needs more info) » Closed (duplicate)

Make 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.

Jean-Philippe Fleury’s picture

OK, yes I confirm that with pathauto-6.x-1.x-dev, the bug is no longer there.

Thanks.

MountainX’s picture

I 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...

Mr Hamster’s picture

Version: 6.x-1.1 » 6.x-1.x-dev

I 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

  • drupal-6.13
rootwork’s picture

I'm seeing this too. Even with the 1.x-dev version of pathauto, I get these errors. I'm running D6.13 as well.

greggles’s picture

The 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.

HnLn’s picture

I 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

pcorbett’s picture

I 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:

    * user warning: Duplicate entry 'taxonomy/term/36-' for key 2 query: INSERT INTO url_alias (src, dst, language) VALUES ('taxonomy/term/', 'taxonomy/term/36', '') in /var/www/example.com/modules/path/path.module on line 112.
    * user warning: Duplicate entry 'articles/qsr-media-' for key 2 query: INSERT INTO url_alias (src, dst, language) VALUES ('taxonomy/term/36', 'articles/qsr-media', '') in /var/www/example.com/modules/path/path.module on line 112.
    * user warning: Duplicate entry 'taxonomy/term/38-' for key 2 query: INSERT INTO url_alias (src, dst, language) VALUES ('taxonomy/term/', 'taxonomy/term/38', '') in /var/www/example.com/modules/path/path.module on line 112.
    * user warning: Duplicate entry 'articles/qsr-media/newswire-' for key 2 query: INSERT INTO url_alias (src, dst, language) VALUES ('taxonomy/term/38', 'articles/qsr-media/newswire', '') in /var/www/example.com/modules/path/path.module on line 112.

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...

Bartezz’s picture

subscribing

Drupal webdesigner’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Assigned: Unassigned » Drupal webdesigner
Priority: Normal » Critical

Sinds 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?

gildor’s picture

After update to dev build, you must delete all existing aliases and then create new aliases (example in pathauto page). This solves the problem

andrewz’s picture

I 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 ?

mediamash’s picture

is there a solution yet for this issue?

tevih’s picture

subscribe

omri100’s picture

subscribe

apodic’s picture

Subscribe

fletch11’s picture

subscribe

stoptime’s picture

subscribe

m.sant’s picture

subscribe