CMS Development

jurbank
Participant

HTML Email, duplicate fields in the content editor

SOLVE

I've created a new HTML email from scratch in order to get very close to a custom design.

As I started to integrate the template with the COS, I started to see an issue with duplicate fields like so:

duplicates.jpg

 

However, in the template, each of the two highlighted fields is defined and used only 1 time.

    {% image "image_two", label='Small Promo Image', src='https://cdn2.hubspot.net/hubfs/3088750/Images/Email/Sample%20Email/woman-microscope.jpg', export_to_template_context=True %}
    {% image "article_image", label="Article Image", src="https://cdn2.hubspot.net/hubfs/3088750/Images/Email/Sample%20Email/geo-material.jpg", export_to_template_context=True %}

Note: the images still only output 1 image to the email, as they should. It's just a poor user experience for our client to see a bunch of duplicate fields.

 

I've tried removing all of the code, going line by line in order to resolve this, but to no avail.

If I remove all of the code It shows only those two fields but still duplicated.
However, if I remove the export_to_template_context, then they two fields display in the content editor as they should, without the duplicate.

I've been really banging my head on this one. Any help would be appreciated.

Thanks!

0 Upvotes
1 Accepted solution
jurbank
Solution
Participant

HTML Email, duplicate fields in the content editor

SOLVE

Update:

I stripped the email down to the following...so I was only displaying a single field and it was still replicated.

 

Here's my code:

<!doctype html>
<html>
    
<head>
  <title></title>
</head>

<body>
    
    {% image "image_two", label='Small Promo Image', export_to_template_context=True %}


    <! HS Required -->
    {{ unsubscribe_link }}
    {{ site_settings.company_name }} 
    {{ site_settings.company_street_address_1 }} 
    {{ site_settings.company_street_address_2 }} 
    {{ site_settings.company_city }} 
    {{ site_settings.company_state }} 
    {{ site_settings.company_zip }} 
    {{ site_settings.company_country }} 

</body>
</html>

I brought this issue up to HS and their response was, it's happening to other clients and is an issue on their end.

If you run into this, your best bet is to work with HS to resolve.

View solution in original post

1 Reply 1
jurbank
Solution
Participant

HTML Email, duplicate fields in the content editor

SOLVE

Update:

I stripped the email down to the following...so I was only displaying a single field and it was still replicated.

 

Here's my code:

<!doctype html>
<html>
    
<head>
  <title></title>
</head>

<body>
    
    {% image "image_two", label='Small Promo Image', export_to_template_context=True %}


    <! HS Required -->
    {{ unsubscribe_link }}
    {{ site_settings.company_name }} 
    {{ site_settings.company_street_address_1 }} 
    {{ site_settings.company_street_address_2 }} 
    {{ site_settings.company_city }} 
    {{ site_settings.company_state }} 
    {{ site_settings.company_zip }} 
    {{ site_settings.company_country }} 

</body>
</html>

I brought this issue up to HS and their response was, it's happening to other clients and is an issue on their end.

If you run into this, your best bet is to work with HS to resolve.