Closed (fixed)
Project:
Mailchimp
Version:
7.x-2.x-dev
Component:
Lists
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Jul 2012 at 21:05 UTC
Updated:
21 Sep 2012 at 14:22 UTC
Jump to comment: Most recent file
Comments
Comment #1
FrancescoUK commentedSame problem here, while updating I've got:
The following updates returned messages
mailchimp_lists module
Update #7202
Failed: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'bartik-mailchimp_lists-customers' for key 'tmd': UPDATE {block} SET delta=:db_update_placeholder_0 WHERE (bid = :db_condition_placeholder_0) ; Array ( [:db_update_placeholder_0] => customers [:db_condition_placeholder_0] => 190 ) in mailchimp_lists_update_7202() (line 250 of /<...>/sites/all/modules/mailchimp/modules/mailchimp_lists/mailchimp_lists.install).
Comment #2
rickmanelius commentedThe issue I'm having is that there two row records where the only difference is one has a delta of 1 and the other has the delta of the machine name.
The way we could get around this is to simply query to see if that machine name already exists... and delete instead of update.
Your mileage may vary as the numeric delta block was listed as being set in node/309, but I didn't have a block set there, so I'm unclear as to what happened there!
Comment #3
antipex commentedCommitted a fix for this.
Comment #4
Stanto commentedJust a heads up, even with the latest version, I still have the same issue.
Failed: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'delta' cannot be null: UPDATE {block} SET delta=:db_update_placeholder_0 WHERE (bid = :db_condition_placeholder_0) ; Array ( [:db_update_placeholder_0] => [:db_condition_placeholder_0] => 644 ) in mailchimp_lists_update_7202() (line 270 of /docroot/sites/all/modules/mailchimp/modules/mailchimp_lists/mailchimp_lists.install).You can see that now the error is on line 270 and not 250, so it's the latest version available in git / dev.
Comment #5
FrancescoUK commentedThank you all for the valuable feedback.
May I ask you (if possible of course) to post a patch as this issue is popping up everytime I need to upgrade a module :-(
Comment #6
Ndesign commentedwhere is the committed fix for this
Comment #7
essbee commentedYep also getting the error in #4
Comment #8
Pheonix25 commentedQUICK FIX:
Go in to the 'block' table, & find the mailchimp_list entries:
SELECT * FROM `block` WHERE module = 'mailchimp_lists'There should be two "bunches", one with numerical values, and one with named values (for each enabled theme) like the below:
CONFIRM that the rest of the values (except for the deltas) are identical.
DELETE the rows that contain named deltas (in my example above, #'s 3 & 4)
Then, run 'drush updatedb' and the numerical delta values should be updated to the list names (i.e.: delta '1' should change to 'list1' in my example above)
** Works on my machine, no liability when you run this in your prod environment, etc. etc. **
Comment #9
antipex commentedAttached is a patch to potentially fix this. I've added a check to see if list results are returned before running the updates, so this appears to solve the issue of a null delta column.
Comment #10
FrancescoUK commentedIs this patch for 7.x-2.6?
I don't seem to see anything resembling that in your patch.
Comment #11
FrancescoUK commentedComment #12
FrancescoUK commentedApologies, I was looking at the wrong location.
However the patch doesn't seem to work for me.
Comment #13
antipex commented@ FrancescoUK: Are you experiencing the same issue in #4, or something different?
Comment #14
FrancescoUK commentedExactly the same I reported in #1
Comment #15
antipex commentedI've committed the patch from #9 to c9fb351.
@FrancescoUK: Sorry, but I can't reproduce your issue.
Comment #16
antipex commentedComment #17
lsolesen commentedDisregard patch. Does not apply to 2.6.
Comment #18
lsolesen commentedCould you please attach the patch you committed to the 2.6 version. The patch in #9 does not apply.
Comment #19
basvredelingNeither patch #9 nor patch #19 cleanly apply to 2.6
However, bug is fixed in latest dev.
Comment #21
flock commentedConfirming that using version 7.x-2.x-dev » fixed
Comment #22
azarzag commented#8 Works for me... thanks