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.
Problem/Motivation
Sometimes inserting token will fail because there is double quotation mark in token like this: [mailchimp_campaign|entity_type=node|entity_id=1770"|view_mode=teaser]
[mailchimp_campaign|entity_type=node|entity_id="1770"|view_mode=teaser]
Proposed resolution
Insert correct token without quotation mark(s).
Comments
Comment #2
asrobComment #3
asrobComment #4
asrobAttached a small patch.
Comment #5
tikaszvince CreditAttribution: tikaszvince at Integral Vision Ltd commentedIts seems ok for me. Thanks
Comment #6
amytswan CreditAttribution: amytswan at ThinkShout commented@asrob - quotation marks are not appearing for me when I go to generate tokens. Would you mind taking me through steps to reproduce the issue, i.e. how the quotations are being applied in tokens in the first place? Thanks, in advance!
Comment #7
JimSmith CreditAttribution: JimSmith commentedI can confirm the quotation marks are appearing in tokens. I have not yet tried to apply the patch.
The steps I followed were:
1. Create a new campaign, then select the list and template.
2. Select the MailChimp text format in the text field.
3. From the "Entity Type" dropdown, select "Content".
4. Start typing a title in the "Entry Title" field. Once I've selected the title of a node, quotation marks surround the title and node ID.
5. Select the appropriate view mode.
6. Click the location in the content are for inserting the token, then select the "Insert entity token" link.
7. The token that is added appears like
[mailchimp_campaign|entity_type=node|entity_id=12"|view_mode=email_blog_tease]
If I manually edit the token to remove the quotation mark, the content displays correctly when the campaign is sent.
Comment #8
Greg BoggsComment #10
ruscoe CreditAttribution: ruscoe at ThinkShout for Mailchimp commentedWorks for me. Thank you!