Duplicate entry error when saving a node with rules.module

mikeytown2 - April 25, 2009 - 23:04
Project:NodeReferrer
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:postponed (maintainer needs more info)
Description

Error happens right before the node is successfully created via watchdog.

Duplicate entry '778-0' for key 1 query: INSERT INTO content_field_referrers (vid, nid, delta) VALUES (778, 431, 0) in /sites/all/modules/cck/content.module on line 1207.

Then here's the corresponding error to go with this one

Duplicate entry '778-0' for key 1 query: INSERT INTO content_field_testimonials (vid, nid, delta) VALUES (778, 431, 0) in /sites/all/modules/cck/content.module on line 1207.

This is a new node so nothing is referencing this, and it wasn't set to be a reference to another node. 431 is the newly created nid. 778 is the vid & it is incremented by 2 on every new node creation. I have the rules module set up to save the node again because various tokens don't get set correctly, so this is a cheap trick that makes all my tokens work.

#1

mikeytown2 - April 25, 2009 - 23:14

#2

yched - April 25, 2009 - 23:59
Status:active» won't fix

I've several reports about this, IIRC all were related to nodereferrer.module. Please see over there.

#3

mikeytown2 - April 26, 2009 - 00:56
Project:Content Construction Kit (CCK)» NodeReferrer
Version:6.x-2.2» 6.x-1.x-dev
Component:content.module» Code
Status:won't fix» active

Moving to NodeReferrer Issue Queue

#4

KiamLaLuno - April 28, 2009 - 15:49
Title:Duplicate entry '778-0' for key 1 query» Duplicate entry error when saving a node with rules.module

#5

andypost - April 29, 2009 - 02:49

So where is a test case to find the bug? Is this really related to NodeReferrer module?

#6

mikeytown2 - April 29, 2009 - 02:53

#445084: Adjust module weight from 0 is where the action is. I found this bug in 3 modules, should be fairly easy to duplicate if you follow http://drupal.org/node/445084#comment-1531066. For this case, enable all Node Referrer Dependencies as well as it's self.

#7

andypost - June 17, 2009 - 15:06

Suppose this bug fixed, try to upgrade to current Beta - Multiple fields is disabled for Node Referrer fields.

#8

mikeytown2 - June 18, 2009 - 08:16

nope still get it with the latest dev

Duplicate entry '902-0' for key 1 query: INSERT INTO content_field_testimonials (vid, nid, delta) VALUES (902, 435, 0) in /home/content/m/c/a/mcarper/html/sites/all/modules/cck/content.module on line 1213.

Duplicate entry '902-0' for key 1 query: INSERT INTO content_field_referrers (vid, nid, delta) VALUES (902, 435, 0) in /home/content/m/c/a/mcarper/html/sites/all/modules/cck/content.module on line 1213.

#9

andypost - June 18, 2009 - 11:33
Status:active» postponed (maintainer needs more info)

@mikeytown2 can you provide more info? NodeReferrer is never save any data to database so it looks very strange!!!

#10

hefox - October 1, 2009 - 13:29

I'm getting this error also and I'm not using Noderefferer, but I am using rules. Perhaps this is a rules bug instead?

 
 

Drupal is a registered trademark of Dries Buytaert.