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.
I have the following situation:
Entities exist, and are tied to Mailchimp Lists using a mailchimp field. I add a new field to these entities for an Address: the existing entities have no data in the database for this new field. I add the Addressfield sub-values to the Mailchimp merge fields in the Mailchimp field configuration.
Now, any time I try to edit and save one of the old entities, I get a MetadataWrapperException because Mailchimp Lists is trying to compare the old and new values in "_mailchimp_lists_subscription_has_changed()", and the old item has no value to get.
Comment | File | Size | Author |
---|---|---|---|
#2 | empty_field_values_exception-2704151-2.patch | 1.25 KB | gcb |
Comments
Comment #2
gcbThis patch simply catches these exceptions, logs the exception, and acknowledges that we have a new value.
A better approach might be to compare the new value to the value that actually exists on Mailchimp at present, but that would require an API call.
Comment #3
gcbComment #5
ruscoe CreditAttribution: ruscoe as a volunteer commentedWe're going to be ending support for the 7.x-3.x branch due to the upcoming deprecation of the v2.0 MailChimp API.
This patch should be rerolled for the 7.x-4.x branch.
Comment #6
samuel.mortensonThis code has changed a bit since 7.x-3.x. If you're still experiencing this problem, please re-open the issue with a new patch. Thanks!