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.
Here is what I'm getting with drush updatedb.
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'omega_sub-mailchimp_lists-my_newsletter' for key 'tmd' [error]
Performed update: mailchimp_lists_update_7202
I haven't debugged beyond that, simply reporting thus far.
Comment | File | Size | Author |
---|---|---|---|
#17 | mailchimp-blockdeltaupdate-1700662-17.patch | 2.14 KB | lsolesen |
#9 | mailchimp-blockdeltaupdate-1700662-9.patch | 2.16 KB | antipex |
Comments
Comment #1
FrancescoUK CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: antipex commentedCommitted a fix for this.
Comment #4
Stanto CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: Ndesign commentedwhere is the committed fix for this
Comment #7
essbee CreditAttribution: essbee commentedYep also getting the error in #4
Comment #8
Pheonix25 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: FrancescoUK commentedIs this patch for 7.x-2.6?
I don't seem to see anything resembling that in your patch.
Comment #11
FrancescoUK CreditAttribution: FrancescoUK commentedComment #12
FrancescoUK CreditAttribution: FrancescoUK commentedApologies, I was looking at the wrong location.
However the patch doesn't seem to work for me.
Comment #13
antipex CreditAttribution: antipex commented@ FrancescoUK: Are you experiencing the same issue in #4, or something different?
Comment #14
FrancescoUK CreditAttribution: FrancescoUK commentedExactly the same I reported in #1
Comment #15
antipex CreditAttribution: antipex commentedI've committed the patch from #9 to c9fb351.
@FrancescoUK: Sorry, but I can't reproduce your issue.
Comment #16
antipex CreditAttribution: antipex commentedComment #17
lsolesen CreditAttribution: lsolesen commentedDisregard patch. Does not apply to 2.6.
Comment #18
lsolesen CreditAttribution: 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 CreditAttribution: flock commentedConfirming that using version 7.x-2.x-dev » fixed
Comment #22
azarzag CreditAttribution: azarzag commented#8 Works for me... thanks