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.
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.
Comment | File | Size | Author |
---|---|---|---|
#4 | mailchimp-update.patch | 4.17 KB | fago |
Comments
Comment #1
levelos CreditAttribution: levelos commentedThere 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.
Comment #2
bradwade CreditAttribution: bradwade commentedHaving 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?)
Comment #3
rokr CreditAttribution: rokr commentedUpdate #7200 still fails with error message above in my case when upgrading from 7.x-2.1 to 7.x-2.3 directly.
Comment #4
fagoI 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.
Comment #5
levelos CreditAttribution: levelos commentedThanks @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?
Comment #6
rokr CreditAttribution: rokr commentedRight 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
Comment #7
levelos CreditAttribution: levelos commentedWe 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.