By default mailchimp_lists.field.inc uses underscores in the token type for merge fields - eg. [commerce_customer_profile:field-email]. Some modules (eg. commerce_customer) define the token type using hyphens, which seems to be the standard (https://www.drupal.org/node/1302056), and token_replace fails to replace the token.

Attached patch replaces underscores with hyphens in the token type.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bgilhome’s picture

bgilhome’s picture

Actually, mailchimp_lists_fieldmap_options() is a better place to put it - $key is already replaced, just replace $entity_type as well. Updated patch attached.

bgilhome’s picture

Also, this should apply to the 'available tokens' field and the field validation function. Updated patch attached.

jami’s picture

Assigned: Unassigned » jami
jami’s picture

Assigned: jami » Unassigned
ruscoe’s picture

Status: Needs review » Closed (won't fix)

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. If you're still seeing this issue with the most recent release, please feel free to reopen.