Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I imported a Webform node from a test site to the stage 1 stie and when saving after previewed i get the following message:
user warning: Duplicate entry '313' for key 1 query: INSERT INTO st1_uuid_node_revisions (vid, uuid) VALUES (313, 'defd5608-e72e-102e-a02a-36d279e821eb') in C:\Inetpub\wwwroot\st1\sites\all\modules\uuid\uuid.module on line 65.
Comment | File | Size | Author |
---|---|---|---|
#4 | warning-duplicate-entry-line-65-1187242-4.patch | 933 bytes | carsato |
Comments
Comment #1
manu77 CreditAttribution: manu77 commentedI had the same problem. It seems to occur when the node is not revised.
In uuid.module on line 65 I replaced :
if (isset($node->revision)) {
by :
if (isset($node->revision) && $node->revision) {
and that seems to solve the problem
Comment #2
enriqe CreditAttribution: enriqe commentedIt's working now. Thank you!!
Comment #3
austintnacious CreditAttribution: austintnacious commentedIs this a "patch"?
Should it BE a patch?
Is this fix included in .dev?
Comment #4
carsato CreditAttribution: carsato commentedI've made a patch to resolve the issue in my project.
It checks vid row to do a "insert into" or a "update" operation
hope It helps
Comment #5
jlea9378 CreditAttribution: jlea9378 commentedThis patch appears to have resolved the problem I was having with errors for duplicate entries appearing in my recent log entries.
Comment #6
liquidcms CreditAttribution: liquidcms commentedis this related? i get this error whenever I re-submit an existing node:
user warning: Duplicate entry '3131' for key 'PRIMARY' query: INSERT INTO uuid_node_revisions (vid, uuid) VALUES (3131, '61174398-371e-11e1-bd72-00163e002056') in /home/admin/public_html/tubman/sites/all/modules/uuid/uuid.module on line 68.
patch above does not help.
Comment #7
carsato CreditAttribution: carsato commentedI think it's related.
Maybe you didn't apply the patch right. Is that possible?
(you know, file permissions, owner and similar administration stuff issues that sometimes oneself miss, myself too)
I ask it because the patch should work.
It reads the database record and if exists updates, and if not inserts. Your error is because It inserts the values instead of updates it, that's why I think the patch is not applied. The existence of 3131 record is never checked here.
You need to go to uuid module root folder (normally on sites/all/modules/uuid) and do "git apply warning-duplicate-entry-line-65-1187242-4.patch"
cd sites/all/modules/uuid
cp /path/to/patch/warning-duplicate-entry-line-65-1187242-4.patch .
git apply warning-duplicate-entry-line-65-1187242-4.patch
I think you are an experienced drupal user, I write It just in case and to help possible non advanced users reading this post :)
Comment #8
updeshhw CreditAttribution: updeshhw commentedThanks a lot.....
Comment #9
updeshhw CreditAttribution: updeshhw commentedAnyone can help me???
I am getting this error when i am uploading any image. Kindly help me...
warning: Parameter 1 to file_validate_image_resolution() expected to be a reference, value given in /home/www/public_html/drupal/includes/file.inc on line 552.
warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/www/public_html/drupal/includes/file.inc on line 552.
warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/www/public_html/drupal/includes/file.inc on line 552.
warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/www/public_html/drupal/includes/file.inc on line 552.
Thanks
Comment #10
skwashd CreditAttribution: skwashd commentedThe proposed change results in the same logic being duplicated. Please ensure the insert/update operations are centralised. You have used tabs instead of spaces in some of the code.
Once the issues outlined above are resolved, I would happy to apply the patch.
Comment #11
apotek CreditAttribution: apotek commentedPatch in #4 is based on a very old and out-of-date version of the uuid module. Looking at the current 'update' $op of the uuid_nodeapi() function, I believe this issue is already resolved in the current dev versions. In any case, the queries in this patch would no longer work since the uuid schema for uuid_node_revision table includes three columns now, not two.
Users who are having this issue should try a more recent version of the module.
I'm not a maintainer, so I don't feel qualified to mark this closed.
Comment #12
skwashd CreditAttribution: skwashd at Dave Hall Consulting for Dave Hall Consulting commentedDrupal 6 core is no longer supported. We are no longer supporting 6.x-1.x versions of this module. I am closing this issue as won't fix.