Email template cannot be approved "Variable Not Defined: " | Community
Skip to main content
March 12, 2018
Solved

Email template cannot be approved "Variable Not Defined: "

  • March 12, 2018
  • 1 reply
  • 5426 views

I am using a few variables to control certain aspects of the layouts of my email modules.

When I try to approve the template I am receiving the error message 'Variable Not Defined: copySectionMarginBottom'

I find when I change the order of the meta tags, sometimes 'copySectionMarginTop' will not be defined, or one of the other variables I have defined in the head will error out instead.

When I change the id in the body code (to something like ${copySectionMarginBottomTest}) I get the inline error in the code editor. I can fix it back and the inline error goes away, but still throws a validation error when I try to approve the template.

Any help would be appreciated.

I am using this code

HEAD:

<meta class="mktoNumber" id="copySectionMarginTop" mktoName="Margin Top" default="0" min="0" max="30" units="" step="1" mktoModuleScope="true" />

<meta class="mktoNumber" id="copySectionMarginBottom" mktoName="Margin Bottom" default="15" min="0" max="30" units="" step="1" mktoModuleScope="true" />

BODY CONTAINER:

<table  id="container" class="mktoContainer" width="100%" cellpadding="0" cellspacing="0" border="0">

  <tr class="mktoModule" id="singleColumnModule" mktoName="Single Column Module" mktoAddByDefault="true" >

  <td>

  <table>

  <tr>

  <td style="line-height: 0;padding:0;" height="${copySectionMarginTop}"> </td>

  </tr>

  <tr>

  <td style="padding: 0;">

  <table style="background-color: white;">

  <tr>

  <td width="15"> </td>

  <td width="10" class="em_hide"> </td>

  <td>

  <table width="100%" border="0" cellspacing="0" cellpadding="0">

  <tr>

  <td style="color: #494848;font-family:Arial,Helvetica,sans-serif;" class="mktoText" id="singleColumnText" mktoName="Single Column Text">

  Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sint adipisci assumenda distinctio quam perferendis quia unde doloribus hic ipsa et? Quod doloremque animi, similique omnis dolor iusto maiores eligendi autem.

  </td>

  </tr>

  </table>

  </td>

  <td width="10" class="em_hide"> </td>

  <td width="15"> </td>

  </tr>

  </table>

  </td>

  </tr>

  <tr>

  <td style="line-height: 0;padding:0;" height="${copySectionMarginBottom}"> </td>

  </tr>

  </table>

  </td>

  </tr>

</table>

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by

Try to insert

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<meta name="viewport" content="width=device-width, initial-scale=1.0 " />

before Marketo variables and check whether it works better.

-Greg


Thank you for your reply Greg,

I think this problem is caused by a No-Break Space (U+00A0) after the closing brace of my meta tags.

I find the online editor a little frustrating without code folding support etc. so I use my own editor to do work and copy paste the code into the online editor. I think this process introduced some invisible characters that broke the HTML parser.

1 reply

Grégoire_Miche2
New Participant
March 13, 2018

The code seems good.

The problem might be elsewhere.

Can you please provide the complete code of the template ?

-Greg

March 13, 2018
Content backfill required
Grégoire_Miche2
New Participant
March 13, 2018

Try to insert

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<meta name="viewport" content="width=device-width, initial-scale=1.0 " />

before Marketo variables and check whether it works better.

-Greg