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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

manu77’s picture

I 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

enriqe’s picture

It's working now. Thank you!!

austintnacious’s picture

Is this a "patch"?
Should it BE a patch?

Is this fix included in .dev?

carsato’s picture

I'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

jlea9378’s picture

Status: Active » Needs review

This patch appears to have resolved the problem I was having with errors for duplicate entries appearing in my recent log entries.

liquidcms’s picture

is 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.

carsato’s picture

I 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 :)

updeshhw’s picture

Thanks a lot.....

updeshhw’s picture

Issue tags: +warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/www/public_html/drupal/includes/file.inc on line 552.

Anyone 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

skwashd’s picture

Status: Needs review » Needs work

The 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.

apotek’s picture

Patch 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.

skwashd’s picture

Issue summary: View changes
Status: Needs work » Closed (won't fix)

Drupal 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.