Email Number variable not defined | Community
Skip to main content
July 5, 2016
Question

Email Number variable not defined

  • July 5, 2016
  • 1 reply
  • 4270 views

I have the following code with two number variables; one for the the top table cell and one for the bottom table cell.

I am getting an error saying the second number variable is not defined.

Error: Variable Not Defined: articleSectionSpacer2

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

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">

<head>

<!-- Marketo Variable Definitions -->

<meta class="mktoNumber" id="articleSectionSpacer1" mktoName="Article heading top spacer" default="30">

<meta class="mktoNumber" id="articleSectionSpacer2" mktoName="Article heading bottom spacer" default="30">

</head>

<body class="body">

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

  <tr>

    <td height="${articleSectionSpacer1}"></td>

  </tr>

  <tr>

    <td>

      Article section heading

    </td>

  </tr>

  <tr>

    <td height="${articleSectionSpacer2}"></td>

  </tr>

</table>

</body>

</html>

Have I missed anything. I can't figure out why I'm getting this error.

Thanks

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

1 reply

Grégoire_Miche2
Level 10
July 5, 2016

Hi Matt,

Everything seems to be OK.

Can you provide a screenshot with the error showing up?

-Greg

July 8, 2016

Hi Greg,

I changed my variable names to see if that corrected the issues, unfortunately not.

This is the error message if I validate the html:

“Error: Variable Not Defined: articleSpacerBottom

Error: Variable Not Defined: articleSpacerTop

Error: Variable Not Defined: articleSectionSpacerBottom

Error: Variable Not Defined: separatorSpacerTop”

If I approve I get a different error:

“Variable Not Defined: articleSpacerBottom”

I’ve been building out these templates using a task runner, where the primary task is to inline all external css to the html file and then also apply the styles inline to each element with in the document.

If I create a separate template and author the variables and markup within the template editor I don’t get an issues.

<html>

  <head>

    <meta class="mktoNumber" id="bannerSpacerTop" mktoname="Banner top spacer" default="30" min="10" max="60" step="10">

    <meta class="mktoBoolean" id="alignHeader" mktoname="Center logo" default="false" false_value="left" true_value="center" false_value_name="Left" true_value_name="Centered">

    <meta class="mktoNumber" id="bannerSpacerBottom" mktoname="Banner spacer bottom" default="30" min="10" max="60" step="10">

    <meta class="mktoNumber" id="sectionSpacerTop" mktoname="spacer spacer top" default="30" min="0" max="30" step="5">

    <meta class="mktoNumber" id="spacerSpacerBottom" mktoname="spacer spacer bottom" default="30" min="0" max="30" step="5">

  </head>

  <body>

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

      <tbody>

        <tr>

          <td height="${bannerSpacerTop}"></td>

        </tr>

        <tr>

          <td align="${alignHeader}">A heading</td>

        </tr>

        <tr>

          <td height="${bannerSpacerBottom}"></td>

        </tr>

        <tr>

          <td height="${sectionSpacerTop}"></td>

        </tr>

        <tr>

          <td>

            <hr></td>

        </tr>

        <tr>

          <td height="${spacerSpacerBottom}"></td>

        </tr>

        <tr>

          <td>Some more text</td>

        </tr>

      </tbody>

    </table> 

  </body>

</html>

Marketo works fine with another variable type, it just seems to have an issue with multiple number variable.

Can I send you the build output code to see if you can see an issue?

Thanks

Matt

Grégoire_Miche2
Level 10
July 8, 2016

@Justin Cooperman​, may be you will be able to see something that we are missing

-Greg