User Warning: Duplicate Entry into Variable Table

Campsoupster - October 10, 2006 - 23:04
Project:Taxonomy Defaults
Version:HEAD
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:by design
Description

(I'm still a littel new in terms of understanding how all the underlying MySQL tables work, so sorry if this is a no-brainer.)

I've set up a fairly complex system of taxonomy defaults and taxonomy breadcrumbs for a site I'm building. I love the flexibility that these two modules give me over the book.module structure and am eternally grateful to the developers of these two modules.

But I'm getting 2 duplicate entry warnings when I click "save configuration" on the /admin/taxonomy/taxonomy_defaults page. (Please see attached screen shot.) I've gone into the table and deleted the two entries that the warning states I'm trying to duplicate. Once I do so, I can click "save configuration" and do not get the warning. The entries are saved in the variable table). However, the next time that I click "save configuration" I get the same warnings.

I'm guessing that I can just ignore these warnings, as everything seems to be working fine. But I don't understand - and would like to keep things clean.

Any advice?

I'm currently using the cvs version of the module, released on 16 Sept 2006. I'm on Drupal 4.7, running on PHP5 and MySQL5.

Thanks,

Sean

AttachmentSize
tax defaults708.77 KB

#1

Heine - October 11, 2006 - 03:53

Can you attach a more usual image format (png, gif)? Otherwise, could you post the error message and a description of the Taxonomy defaults configuration & configuration changes?

#2

Campsoupster - October 11, 2006 - 12:44

Sorry about that. Here's a PNG.

The user warnings I get are:

* user warning: Duplicate entry 'taxdef_content_newsletter_setup_content_10_activ' for key 1 query: INSERT INTO variable (name, value) VALUES ('taxdef_content_newsletter_setup_content_10_active', 'i:0;') in /home/.mandolin/palmcen/michaelpalmcenter.org/includes/database.mysql.inc on line 120.
* user warning: Duplicate entry 'taxdef_content_resource_library_setup_p_10_activ' for key 1 query: INSERT INTO variable (name, value) VALUES ('taxdef_content_resource_library_setup_p_10_active', 'i:0;') in /home/.mandolin/palmcen/michaelpalmcenter.org/includes/database.mysql.inc on line 120.

Regarding the taxonomy defaults configuration, I have a number of "active" and "inactive" defaults set. These user warnings seem to be generated by "active" defaults. However, even when I unselect these defaults and save the configuration, I get the same warning messages.

In my variable table, I seem to have at least 50 taxdef entries.

Thanks,
sean

AttachmentSize
tax defaults.png 39.76 KB

#3

Heine - October 14, 2006 - 10:27
Status:active» by design

At the moment this is by design: the name of your node type is longer than the 'name' field of the variable table.

The next version of taxonomy defaults will use its own table to prevent this issue. In the mean time you may work around the issue by

1) using shorter node type names.
2) changing the field lenght of the variable table's name column by executing the following query:

ALTER TABLE `variable` CHANGE `name` `name` VARCHAR(80);

#4

Campsoupster - October 14, 2006 - 18:38

Thanks a ton! I really appreciate the help. that explanation makes a ton of sense.

Cheers,
sean

 
 

Drupal is a registered trademark of Dries Buytaert.