When I try to add a new term I get the following error.
user warning: Duplicate entry '282' for key 1 query: INSERT INTO term_data (tid, name, description, vid, weight) VALUES (282, 'term1', '', 4, 0) in /path/includes/database.mysql.inc on line 172.

The tid 282 is in another vocublary vid=3 not in vid=4. It sounds it is not checking vid just only tid.

Comments

gpk’s picture

Category: bug » support
Priority: Critical » Normal
Status: Active » Fixed

{term_data} uses the {sequences} table to keep track of the highest tid. Maybe it has got out of sequence for some reason. I think the value for term_data_tid in {sequences} should be at least the highest tid in {term_data}. See also http://lists.drupal.org/pipermail/support/2008-April/008472.html

This is handled differently in D6+.

Changing status, reset if your problem is not fixed.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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