4 Replies Latest reply on Mar 13, 2018 1:31 PM by Dev Fingerpaint

    Email template cannot be approved "Variable Not Defined: "

    Dev Fingerpaint

      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>
      
      
        • Re: Email template cannot be approved "Variable Not Defined: "
          Grégoire Michel

          The code seems good.

           

          The problem might be elsewhere.

           

          Can you please provide the complete code of the template ?

           

          -Greg

            • Re: Email template cannot be approved "Variable Not Defined: "
              Dev Fingerpaint

              Below is the full template. I have added a couple new variables. I have been able to get this to validate. I notice that when I add a new variable to the head, the new variable does not validate. When I switch the order of the variables, different sets of them will be invalid seemingly randomly.

               

               

              <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

              <html xmlns:v="urn:schemas-microsoft-com:vml"><head>  <title></title>  <meta class="mktoString" id="HEROALT" mktoName="Hero Alt Text" default="Lorem Ipsum" /> 

              <meta class="mktoColor" id="BACKGROUNDCOLOR" mktoName="Background Color" default="#330072" mktoModuleScope="true" /> 

              <meta class="mktoString" id="CTALINK" mktoname="Button Link" default="https://www.example.com" mktoModuleScope="true" /> 

              <meta class="mktoString" id="CTATEXT" mktoname="Button Label" default="CTA text" mktoModuleScope="true" /> 

              <meta class="mktoNumber" id="CTAHEADINGFONTSIZE" mktoName="Heading font size" default="30" min="20" max="45" units="px" mktoModuleScope="true" />
              <meta class="mktoNumber" id="COPYSECTIONMGNTOP" mktoName="Margin Top" default="0" min="0" max="45"  mktoModuleScope="true" />  <meta class="mktoNumber" id="COPYSECTIONMGNBTM" mktoName="Margin Bottom" default="30" min="0" max="45" mktoModuleScope="true" />
              <meta class="mktoNumber" id="HEADLINEMGNTOP" mktoName="Headline Margin Top" default="0" mktoModuleScope="true" />  <meta class="mktoNumber" id="HEADLINEMGNBTM" mktoName="Headline Margin Bottom" default="0" mktoModuleScope="true" />

               

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

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

               

               

              <style type="text/css">   a[x-apple-data-detectors] {
                 color: inherit !important;   text-decoration: none !important;   font-size: inherit !important;   font-family: inherit !important;   font-weight: inherit !important;   line-height: inherit !important;  }

                 body {
                 margin: 0 !important;   padding: 0 !important;   -webkit-text-size-adjust: 100% !important;   -ms-text-size-adjust: 100% !important;   -webkit-font-smoothing: antialiased !important;   font-family: sans-serif;   overflow-x: hidden;   color: #494848;   font-size: 16px;  }

                .button_container {
                 width: 232px;  }

                 img {
                 border: 0 !important;   outline: none !important;  }

                 p {
                 margin: 0;   padding: 0;  }

                 table {
                 border-collapse: collapse;   mso-table-lspace: 0;   mso-table-rspace: 0;   border-spacing: 0;   table-layout: fixed;  }

                .sup {
                 -webkit-text-size-adjust: none;  }

                 td,  a,  span {
                 border-collapse: collapse;   mso-line-height-rule: exactly;   /*padding: 0;*/   border-spacing: 0;  }

                 td {
                 padding: 0;   text-align: left;  }

                .em_height_24 {
                 height: 24px !important;  }

                .em_width_58 {
                 width: 58px !important;   border-collapse: collapse;  }

                .em_width_43 {
                 width: 43px !important;   border-collapse: collapse;  }

                .em_width_36 {
                 width: 36px !important;   border-collapse: collapse;  }

                .em_height_17 {
                 height: 17px !important;   border-collapse: collapse;  }

                .em_height_2 {
                 height: 2px !important;   border-collapse: collapse;  }

                .em_height_12 {
                 height: 12px !important;   border-collapse: collapse;  }

                .em_width_16 {
                 width: 16px !important;  }

                .em_width_20 {
                 width: 20px !important;  }

                .em_height_41 {
                 height: 41px !important;  }

                .footer-copy {
                 text-align: center !important;  }

                .em_show {
                 display: none;  }

                 @media only screen and (max-width: 480px) {
                .button_container {
                 width: 260px;  }
                .em_main_table {
                 padding: 0 10px !important;   width: 100% !important;  }
                .em_wrapper {
                 width: 100% !important;  }
                .em_show {
                 display: table-cell;  }
                .em_wrapper_22 {
                 width: 100% !important;   margin-bottom: 22px !important;  }
                .em_wrapper_15 {
                 width: 100% !important;   margin-bottom: 15px !important;  }
                .em_height_41 {
                 height: 18px !important;  }
                .em_hide {
                 display: none !important;  }
                .em_align_center {
                 text-align: center !important;  }
                .em_pad_top {
                 padding-top: 20px !important;  }
                .em_pad_top {
                 padding-top: 20px !important;  }
                .em_bg_center {
                 background-position: center !important;  }
                .em_full_width {
                 width: 100% !important;   height: auto !important;   max-width: 100% !important;  }
                .em_pad_btm {
                 padding-bottom: 29px !important;  }
                .em_side_space {
                 padding-left: 20px !important;   padding-right: 20px !important;  }
                .em_logo_center {
                 text-align: center !important;   margin: auto;   width: 168px;  }
                .em_red_box_center {
                 width: 70%;  }
                .em_width_60 {
                 width: 15px !important;  }
                .em_width_30 {
                 width: 15px !important;  }
                .em_height_41 {
                 height: 15px !important;  }
                .max_width_250 {
                 max-width: 250px !important;  }
                 a.font_size_12 {
                 font-size: 12px !important;   text-align: center !important;   white-space: normal !important;  }
                .em_600_hide {
                 display: table !important;   width: 100% !important;  }
                .em_600_hide2 {
                 display: table !important;   width: 100% !important;  }
                .em_inner_table {
                 width: 90% !important;  }
                .float-right {
                 float: none !important;   width: 100% !important;  }
                .float-left {
                 float: none !important;   width: 100% !important;  }
                }

                 @media only screen and (min-width: 480px) and (max-width: 620px) {
                .em_main_table {
                 width: 100% !important;  }
                .em_show {
                 display: table-cell;  }
                .em_inner_table {
                 width: 90% !important;  }
                .em_wrapper {
                 width: 100% !important;  }
                .em_hide {
                 display: none !important;  }
                .em_hide_medium {
                 display: none;  }
                .em_height_41 {
                 height: 18px !important;  }
                .em_align_center {
                 text-align: center !important;  }
                .em_pad_top {
                 padding-top: 20px !important;  }
                .em_side_space {
                 padding-left: 20px !important;   padding-right: 20px !important;  }
                .em_bg_center {
                 background-position: center !important;  }
                .em_full_width {
                 width: 100% !important;   height: auto !important;   max-width: 100% !important;  }
                .em_pad_btm {
                 padding-bottom: 17px !important;  }
                .em_logo_center {
                 text-align: left !important;  }
                .em_red_box_center {
                 width: 45%;  }
                .em_wrapper_22 {
                 width: 100% !important;   margin-bottom: 22px !important;  }
                .em_wrapper_15 {
                 width: 100% !important;   margin-bottom: 15px !important;  }
                .max_width_250 {
                 max-width: 250px !important;  }
                .em_600_hide {
                 display: table !important;   width: 100% !important;  }
                .em_600_hide2 {
                 display: table !important;   width: 100% !important;  }
                .float-right {
                 float: none !important;   width: 100% !important;  }
                .float-left {
                 float: none !important;   width: 100% !important;  }
                }

                .float-right {
                 float: right;   -webkit-margin-start: 0 !important;   -webkit-margin-end: 0 !important;  }

                .float-left {
                 float: left;   -webkit-margin-start: 0 !important;   -webkit-margin-end: 0 !important;  }

                 @media only screen and (min-width: 620px) {
                .em_600_hide2 {
                 display: none !important;  }
                .font_size_12 {
                 white-space: normal !important;  }
                .em_left_padding_35 {
                 padding-left: 35px;  }
                .em_right_padding_5 {
                 padding-right: 5px;  }
                .em_orange_border_left {
                 border-left: 1px solid #E86B1D;  }
                .em_hide_large {
                 display: none;  }
                .footer-copy {
                 text-align: left !important;  }
                .em_show {
                 display: none;  }
                }
                 </style>   <!--[if gte mso 12]>  <style type="text/css">   sup {  font-size: 100% !important;  }  .hide-on-mso {  display: none !important;  mso-hide: all !important;  }  </style>  <![endif]--></head><body style="margin:0; padding:0;background-color:#e1daea;width:100%;" width="100%" align="center"><!--<span class="preheader" style="display: none! important; visibility: hidden; opacity: 0; color: transparent; height: 0; width: 0; mso-hide: all;">Introducing example<sup>&trade;</sup></span>-->   <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" style="width:100%;background-color:#e1daea;padding:0;text-align:center;">  <tr>  <td class="em_show" width="15"> </td>  <td align="center" valign="top" bgcolor="#e1daea" style="text-align:center;background-color:#e1daea;padding: 0;">  <table align="center" class="em_main_table" width="620" border="0" cellspacing="0" cellpadding="0" style="table-layout:fixed;padding:0;margin: 0 auto;" bgcolor="#e1daea">   <!-- TOP MESSAGE -->   <tr>  <td>  <table align="center" width="100%" cellpadding="0" cellspacing="0" border="0">  <tr>  <td width="20"> </td>  <td height="70" align="center" style="text-align:center;">  <p style="font-size:13px;color:black;margin:20px 0;">  If this message is not displaying properly,
                 <a style="color:#f58d2e;text-decoration: underline;" href="{{system.viewAsWebpageLink}}">view it online</a>.
                 </p>  <p style="font-size:13px;color:black;margin:20px 0;">  Please see <a href="https://www.example.com" target="_blank" style="color:#f58d2e;text-decoration: underline;">full Prescribing Information</a>, <a href="https://www.example.com/" target="_blank" style="color:#f58d2e;text-decoration: underline;">Instructions for Use</a>, and
                 <a href="https://www.example.com/wp-content/themes/example/assets/pdf/example_Patient_Information.pdf" target="_blank" style="color:#f58d2e;text-decoration: underline;">  <nobr>Patient Information</nobr>  </a>.
                 </p>  </td>  <td width="20"> </td>  </tr>  </table>  </td>  </tr>   <!-- /TOP MESSAGE -->  <!-- Hero IMAGE -->   <tr>  <td>  <table width="100%" border="0" cellspacing="0" cellpadding="0">  <tr>  <td align="center" valign="top" bgcolor="#330072">  <div class="mktoImg" id="heroImage" mktoName="Hero Image" mktoImgLink="https://www.example.com" mktoImgWidth="100%" mktoImgLinkTarget="_blank" mktoImgSrc="http://pages.example.com/">  <a><img alt="${HEROALT}" style="width:100%;"></a>  </div>  </td>  </tr>  </table>  </td>  </tr>   <!-- / Hero IMAGE -->  <!-- PURPLE SECTION 2 -->   <tr>  <td style="background-color:#330072;">  <table width="100%" cellpadding="0" cellspacing="0" border="0">  <tr>  <td>  <table width="90%" align="center" style="border-top: 1px solid #ffffff;">  <tr><td style="line-height:0;" height="30"> </td></tr>  <tr>  <td class="mktoText" id="heroEyebrow" mktoName="Hero Eyebrow" style="font-size:16px;font-weight:bold;color:#ffffff;text-align: center;width:90%;font-family:Arial,Helvetica,sans-serif;" align="center" width="90%">  <p style="margin-bottom: 15px;">I am an eyebrow</p>  </td>  </tr>  </table>  </td>  </tr>  <tr>  <td>  <table width="100%" cellpadding="0" cellspacing="0" border="0">  <tr>  <td width="15"> </td>  <td width="30" class="em_hide"> </td>  <td align="center" style="text-align:center; font-size: 25px; color: white; font-weight:bold; margin: 0; line-height:1.4;font-family:Arial,Helvetica,sans-serif;" class="mktoText" id="MAINHEADLINE" mktoName="Main Headline">  Lorem ipsum dolor sit amet, consectetur adipisicing elit.
                 </td>  <td width="30" class="em_hide"> </td>  <td width="15"> </td>  </tr>  </table>  </td>  </tr>  <tr>  <td height="10"> </td>  </tr>  </table>  </td>  </tr>   <!-- / PURPLE SECTION 2 -->  <!-- CONTAINER -->   <tr>   <!-- modules -->   <td style="padding: 0;" width="100%" cellpadding="0" cellspacing="0" border="0">  <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;" height="${COPYSECTIONMGNTOP}"> </td>  </tr>  <tr>  <td>  <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="line-height: 0;" height="30"> </td>  </tr>  <tr>  <td style="color: #494848;font-family:Arial,Helvetica,sans-serif;" class="mktoText em_align_center" 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>  <tr>  <td style="line-height: 0;" height="30"> </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="${COPYSECTIONMGNBTM}"> </td>  </tr>  </table>  </td>  </tr>  <tr class="mktoModule" id="headlineModule" mktoName="Headline Module" mktoAddByDefault="true">  <td>  <table>  <tr><td height="${HEADLINEMGNBTM}" style="line-height: 0;"> </td></tr>  <tr>  <td>  <table width="100%" cellpadding="0" cellspacing="0" border="0" bgcolor="${BACKGROUNDCOLOR}">  <tbody>  <tr>  <td width="28"> </td>  <td width="17" class="em_show"> </td>  <td style="color: white; font-size: 20px; font-weight: bold;padding: 30px 0;">  Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium
                 </td>  <td width="10" class="em_show"> </td>  <td width="25"> </td>  </tr>  </tbody>  </table>  </td>  </tr>  <tr><td height="${HEADLINEMGNTOP}" style="line-height: 0;"> </td></tr>  </table>  </td>  </tr>  <tr class="mktoModule" id="purpleCTASectionModule" mktoName="Purple CTA Module" mktoAddByDefault="true">  <td>  <table>  <tr>  <td style="line-height: 0;" height="${COPYSECTIONMGNTOP}"> </td>  </tr>  <tr>  <td style="padding: 30px 0;" bgcolor="${BACKGROUNDCOLOR}">  <table width="100%" cellpadding="0" cellspacing="0" border="0">  <tr>  <td width="15"> </td>  <td width="10" class="em_hide"> </td>  <td style="color:white;font-size:20px;font-weight: bold;font-family:Arial,Helvetica,sans-serif;" class="mktoText" id="ModuleAreaHeader" mktoName="Module Area Header Text">  <table align="left" width="13%" class="em_wrapper">  <tr>  <td width="100%" style="text-align: center;">  <img style="width:100%; max-width: 80px;" alt="lorem ipsum" src="images/test.png">  </td>  </tr>  </table>  <table width="80%" align="right" class="em_wrapper">  <tr>  <td class="em_align_center" style="font-size:${CTAHEADINGFONTSIZE}; margin-bottom: 15px;">  Lorem ipsum dolor sit amet, consectetur adipisicing elit.
                 </td>  </tr>  <tr>  <td class="em_align_center" style="margin-bottom: 15px;font-size:16px;">  Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur?
                 </td>  </tr>  </table>  <table width="80%" align="right" class="em_wrapper">  <tr>  <td class="em_align_center">  <div>   <!--[if mso]>  <v:rect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" href="${CTALINK}" style="height:150px;v-text-anchor:middle;width:250px;" stroke="f" fillcolor="#f58d2e">  <w:anchorlock/>  <center>  <![endif]-->   <a href="${CTALINK}" target="_blank" style="background-color:#f58d2e;color:#ffffff;display:inline-block;font-family:Arial,Helvetica,sans-serif;font-size:18px;font-weight:bold;line-height:24px;padding:10px;text-align:center;text-decoration:none;-webkit-text-size-adjust:none;width:250px;min-width:250px;">${CTATEXT}</a>   <!--[if mso]>  </center>  </v:rect>  <![endif]-->   </div>  </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;" height="${COPYSECTIONMGNBTM}"> </td>  </tr>  </table>  </td>  </tr>  </table>  </td>  </tr>   <!-- / CONTAINER -->   <tr>  <td height="35" style="line-height:11px;font-size:1px;"></td>  </tr>  <tr>  <td class="mktoSnippet" id="isi" mktoName="ISI" mktoDefaultSnippetId="2"></td>  </tr>  <tr>  <td height="15" style="line-height: 1px"> </td>  </tr>   <!-- REFERENCES -->   <tr>  <td class="mktoText" id="referenceArea" mktoName="References" style="font-size: 13px;line-height:20px;color:black;">  <p><strong>References:</strong></p>  <p><strong>1. </strong>Full Prescribing Information for example. <strong>2. </strong>Data on file. Example, Inc.</p>  </td>  </tr>   <!-- / REFERENCES -->  <!-- BEGIN FOOTER -->   <tr>  <td align="center">  <table width="100%" cellpadding="0" cellspacing="0" border="0">  <tr>  <td height="25" style="line-height: 1px"> </td>  </tr>  <tr>  <td>  <table width="100%" cellpadding="0" cellspacing="0" border="0">  <tr>  <td style="color:black;font-size:13px;line-height: 20px;">   &copy;<span class="mktoText" id="year" mktoName="Year">2018</span> Example.
                 <br>1111 Example NY
                 <br><span class="mktoText" id="jobNum" mktoName="Job Number">example-XX-XXX 03/2018</span>  </td>  </tr>  </table>  </td>  </tr>  <tr>  <td height="25" style="line-height: 1px"> </td>  </tr>  <tr>  <td>  <table width="100%" cellpadding="0" cellspacing="0" border="0">  <tr>  <td width="15" style="width:15px"> </td>  <td align="center">  <table width="100%" cellpadding="0" cellspacing="0" border="0">  <tr>  <td style="font-size: 13px;color:black;text-align: center;line-height:16px;">  If you prefer not to receive any further communications from Example,
                 <nobr>  you can
                 <a href="{{system.unsubscribeLink}}" style="color:#f58d2e;text-decoration: underline;">unsubscribe here</a>.
                 </nobr>  </td>  </tr>  </table>  </td>  <td width="15"> </td>  </tr>  </table>  </td>  </tr>  <tr>  <td height="25" style="line-height: 1px"> </td>  </tr>  </table>  </td>  </tr>   <!-- END FOOTER -->   </table>  </td>  <td class="em_show" width="15"> </td>  </tr>  </table></body></html>