Closed (fixed)
Project:
Universally Unique IDentifier
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Oct 2010 at 02:09 UTC
Updated:
23 Feb 2011 at 21:50 UTC
http://drupal.org/node/915254#comment-3541038 for reference of my original post but turns out this is a separate issue perhaps.
This is my error message:
user warning: Duplicate entry '727' for key 'PRIMARY' query: INSERT INTO uuid_node_revisions (vid, uuid) VALUES (727, '1b969aec-d19b-11df-be90-002219221c49') in /home/autop5/public_html/webmanager/sites/all/modules/uuid/uuid.module on line 70.
I get this error on node edit or new node creation. No nodes were deleted in this process and I have confirmed the bug on multiple sites. It doesn't always happen either. I may edit a node or create new ones and not get the bug but then I randomly get the bug on a different one.
Comments
Comment #1
apmsooner commentedOkay I've installed the updates and have been still having problems with id's clashing and discovered the following: When this module is enabled, I get an error on new node creation like this:
user warning: Duplicate entry '767' for key 'PRIMARY' query: INSERT INTO uuid_node_revisions (vid, uuid, nid) VALUES (767, 'f4d2be04-d555-11df-be90-002219221c49', 753) in /home/autop5/public_html/webmanager/sites/all/modules/uuid/uuid.module on line 62.
What I've discovered is that when a new node is created, node id of 753 is created but version id of 767 is created for that node. The strange thing is that I made sure when testing this that there wasn't already a 767 vid taken. I made sure all the uuid entries, term data, location instances (since i'm using location module) were empty and did a sql query on both the node and node revisions table to make sure that all nid's and vid's match. Still, for some reason a new node is not getting the next available vid if its available. So deleting 767 vid does not make 767 available again as a new vid. Maybe this is a core bug but the UUID module has a problem with it and reports an error because of it. Maybe others aren't seeing this problem because all of their nids and vids have always matched but because I had revisioning enabled on a content type at one time, I had alot of mismatches. I don't have revisioning enabled on any content types now by the way. Is it possible that UUID code overcomes this issue somehow perhaps in the same way the location module has with location ids?
Is anyone else at all experiencing this problem and have a solution?
Comment #2
apotek commentedDid you try either of the patches in http://drupal.org/node/895622? that's the main center for this discussion.
K
Comment #3
apmsooner commentedI've installed the latest dev version which I assume contains those patches? and... same error occurs. From a theory standpoint, from what I've read no 2 tables should share the same primary key name. Isn't the structure of the UUID tables essentially using the same primary key name from the node and the node_revisions tables that could be causing the errors for me? Shouldn't the UUID table have its own unique primary key with nid and vid as foreign keys? This is the only reason I can think my error is occurring...
Comment #4
apmsooner commentedLet me rephrase my statement, no 2 tables should "HAVE" the same primary key name, didn't mean to say "share". Anyhow, am I seriously the only one still getting this error? I just can't believe I've tested this on multiple installs and keep getting this error but noone else seems to be experiencing it.
Comment #5
apotek commentedYou're not the only one, but if you've installed one of the solutions in the thread I mentioned, it should be gone. The patch I drafted has certainly fixed it for me.
Comment #6
apmsooner commentedGot this error when applying version 3 patch
Parse error: syntax error, unexpected T_CASE in /home/~/public_html/~/sites/all/modules/uuid/uuid.module on line 77
Tried to apply version 2 patch and it fails. I give up... i'll just wait for the next functional release.
Thanks anyway.
Comment #7
apotek commentedyou're right. it does not apply cleanly to some versions of the uuid module.
make sure you apply it against latest version from CVS tagged DRUPAL-6--1
rolled a new one in the same thread. that should fix it. sorry about that.
Comment #8
pearcec commentedDo you have "Create new revision" workflow settings enabled for the content type? Once I did this it enabled it. I wonder if we should notify users that we are going to turn on revisions if you enable UUID for a content type.
Comment #9
recidive commentedThis has been fixed in #895622: user warning: Duplicate entry in uuid_node_revisions.
Please re-open if not.