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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

gcb created an issue. See original summary.

gcb’s picture

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

gcb’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 2: empty_field_values_exception-2704151-2.patch, failed testing.

ruscoe’s picture

Version: 7.x-3.3 » 7.x-4.x-dev

We'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.

samuel.mortenson’s picture

Status: Needs work » Closed (outdated)

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