I already have tid's up to 221 in the term_data table. The code seems to want to specify the tid instead of letting auto_increment do the job. Where it gets the low tid I didn't yet discover. Note that whenever I submit a new try, the tid is incremented by 1. It is a little tedious though to reenter the data until 222.

This is the message I receive:

user warning: Duplicate entry '12' for key 1 query: INSERT INTO drup_term_data (tid, name, description, vid, weight) VALUES (12, 'Ticker (Stock, Bonds, Currencies) Discussions', 'Ticker (Stock, Bonds, Currencies) Discussions', 4, 0) in /mnt/w0201/d36/s35/b02ae1cf/www/bullbearbuzz.com/cms/includes/database.mysql.inc on line 172.

Comments

regli’s picture

This might not be a bug as such as I added items via SQL into the term table as it would have been too tedious to enter 100's of items by hand. However, I assume that there is a counter kept somewhere that keeps to total items added. Obviously (and fortunately for me) it gets incremented at every new try even if the insert is unsuccessful. It might be better to take advantage of the auto_increment or otherwise do a max () request before inserting.

cog.rusty’s picture

Category: bug » support

Whenever you add rows to a table using SQL you need to update the max ID in the proper row of the 'sequences' table.

cog.rusty’s picture

Status: Active » Closed (works as designed)