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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

FrancescoUK’s picture

Same 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).

rickmanelius’s picture

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

antipex’s picture

Status: Active » Fixed

Committed a fix for this.

Stanto’s picture

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

FrancescoUK’s picture

Thank 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 :-(

Ndesign’s picture

Status: Fixed » Needs work

where is the committed fix for this

essbee’s picture

Yep also getting the error in #4

Pheonix25’s picture

QUICK 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:

  • bid - module - delta
  1. XXX - mailchimp_lists - 1
  2. XXX - mailchimp_lists - 2
  3. XXX - mailchimp_lists - list1
  4. XXX - mailchimp_lists - list2

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

antipex’s picture

Status: Needs work » Needs review
FileSize
2.16 KB

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

FrancescoUK’s picture

Is this patch for 7.x-2.6?

I don't seem to see anything resembling that in your patch.

FrancescoUK’s picture

Status: Needs review » Active
FrancescoUK’s picture

Status: Active » Needs review

Apologies, I was looking at the wrong location.

However the patch doesn't seem to work for me.

antipex’s picture

@ FrancescoUK: Are you experiencing the same issue in #4, or something different?

FrancescoUK’s picture

Exactly the same I reported in #1

antipex’s picture

I've committed the patch from #9 to c9fb351.

@FrancescoUK: Sorry, but I can't reproduce your issue.

antipex’s picture

Status: Needs review » Fixed
lsolesen’s picture

Disregard patch. Does not apply to 2.6.

lsolesen’s picture

Status: Fixed » Needs work

Could you please attach the patch you committed to the 2.6 version. The patch in #9 does not apply.

basvredeling’s picture

Version: 7.x-2.6 » 7.x-2.x-dev
Status: Needs work » Fixed

Neither patch #9 nor patch #19 cleanly apply to 2.6
However, bug is fixed in latest dev.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

flock’s picture

Confirming that using version 7.x-2.x-dev » fixed

azarzag’s picture

#8 Works for me... thanks