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.
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.
Comment | File | Size | Author |
---|---|---|---|
#3 | mailchimp-token_type_underscore-2542560-3.patch | 2.1 KB | bgilhome |
| |||
#2 | mailchimp-token_type_underscore-2542560-2.patch | 793 bytes | bgilhome |
| |||
#1 | mailchimp-token_type_underscore-2542560-1.patch | 850 bytes | bgilhome |
|
Comments
Comment #1
bgilhome CreditAttribution: bgilhome commentedComment #2
bgilhome CreditAttribution: bgilhome commentedActually, mailchimp_lists_fieldmap_options() is a better place to put it - $key is already replaced, just replace $entity_type as well. Updated patch attached.
Comment #3
bgilhome CreditAttribution: bgilhome commentedAlso, this should apply to the 'available tokens' field and the field validation function. Updated patch attached.
Comment #4
jami CreditAttribution: jami at ThinkShout for Mailchimp commentedComment #5
jami CreditAttribution: jami at ThinkShout for Mailchimp commentedComment #6
ruscoe CreditAttribution: ruscoe at ThinkShout 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. If you're still seeing this issue with the most recent release, please feel free to reopen.