Updating from 7.x-2.1 to 7.x-2.2 gave me the following error on two separate sites:

Update #7200
•Failed: PDOException: SQLSTATE[01000]: Warning: 1265 Data truncated for column 'name' at row 1: ALTER TABLE {mailchimp_lists} CHANGE `name` `name` VARCHAR(32) NOT NULL COMMENT 'The machine-readable name of this mailchimp_list type.'; Array ( ) in db_add_field() (line 2808 of /home/wts/public_html/includes/database/database.inc).

Note: I am not equiped with understanding of the issue, and have not faced something like this before.

CommentFileSizeAuthor
#4 mailchimp-update.patch4.17 KBfago
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

levelos’s picture

Status: Active » Fixed

There was an error in the update process for 2.x-2.2, sorry about that. Just rolled a new release to address the issue, http://drupal.org/node/1358576.

bradwade’s picture

Having already installed 7.x-2.2 and received this error, updating to 7.x-2.3 was not sufficient to fix error. Although 7.x-2.3 added update #7201, update #7200 remained in the list of available updates and continued to fail before #7201 could run. I had to disable and *uninstall* mailchimp_lists to remove the updates from the list. Re-installing 7.x-2-3 fresh resulted in no errors.
(Was there a better way to recover from this situation?)

rokr’s picture

Version: 7.x-2.2 » 7.x-2.3
Status: Fixed » Needs work

Update #7200 still fails with error message above in my case when upgrading from 7.x-2.1 to 7.x-2.3 directly.

fago’s picture

Status: Needs work » Needs review
FileSize
4.17 KB

I ran into the same problem. Attached patch fixed it for me:
* Do not use entity_load() or entity_save() in update.php - it relies on a stable-state.
* Made the update safe so it can be re-run and cleans up the mess.

levelos’s picture

Thanks @fago, I wasn't aware I couldn't rely on entity_load/save in hook_update_N(). Does anyone think we need to add a mailchimp_lists_update_7202() for those who are stuck in a corrupted state from mailchimp_lists_update_7201()? Also, is the consensus that this warrants a new tagged release on its own?

rokr’s picture

Right now users are stuck in 7200, not 7201. I didn't test fagos patch yet but i'm going to do so asap.

cheers, rokr

levelos’s picture

Title: PDOException: SQLSTATE[01000]: Warning: 1265 Data truncated for column 'name' » Entity load and save operations in hook_update_N cause update failures
Status: Needs review » Fixed

We tested fago's latest patch pretty thoroughly and it seems to allow for a clean update from 2.1, 2.2, and 2.3. I'll roll a 2.4 after a bit more testing by folks. Thanks for the patience. Committed in f0d2c49c84ada616eaf5b0eda8a2ba8635d5a28b.

Title changed to reflect the ticket better.

Status: Fixed » Closed (fixed)

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