Jump to content
  • 0

Template Parse Error


Nyleveia

Question

Hello guys I wonder if anyone can help. I have been trying to update my email layout on the system for some time. I have coded my own HTML email templates and I am using this when editing the template. However when I try and update template it is showing the following error: 

 

Template parse error: unexpected character in filters : ";" at 55

 

I have looked everywhere and cannot seem to find any answers. If anyone could help I would really appreciate it. Thank you in advance.

 

Nyleveia.

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

I have run my code through various checkers but none seem to fetch any errors. I have also checked the code myself. Strange one! Below is the code in case you are able to notice anything. 

<style type="text/css">
body {
   padding-top: 0 !important;
   padding-bottom: 0 !important;
   padding-top: 0 !important;
   padding-bottom: 0 !important;
   margin:0 !important;
   width: 100% !important;
   -webkit-text-size-adjust: 100% !important;
   -ms-text-size-adjust: 100% !important;
   -webkit-font-smoothing: antialiased !important;
 }
.tableContent img {
	border: 0 !important;
	display: block !important;
	outline: none !important;
	text-align: center;
 }
a{
  color:#382F2E;
}
p, h1,h2,h3,ul,ol,li,div{
  margin:0;
  padding:0;
}
h1,h2{
  font-weight: normal;
  background:transparent !important;
  border:none !important;
}
.contentEditable h2.big{
  font-size: 30px !important;
}
 .contentEditable h2.bigger{
  font-size: 37px !important;
}
td,table{
  vertical-align: top;
}
td.middle{
  vertical-align: middle;
}
a.link1{
  font-size:14px;
  color:#D4D4D4;
  text-decoration:none;
  font-family: Helvetica Neue;
}
.link2{
font-size:16px;
color:#d2176e;
text-decoration:none;
line-height:24px;
font-family: Helvetica;
font-weight: bold;
}
.link3{
padding:5px 10px;
border-radius: 6px;
background-color: #d2176e;
font-size:13px;
color:#f2f2f2;
text-decoration:none;
line-height:26px;
font-family: Helvetica;
font-weight: bold;
}
.contentEditable li{
  margin-top:10px;
  margin-bottom:10px;
  list-style: none;
  color:#ffffff;
  text-align:center;
  font-size:13px;
  line-height:19px;
}
.appart p{
  font-size:13px;
  line-height:19px;
  color:#aaaaaa !important;
}
h2{
  color:#555555;
  font-weight: normal;
  font-size:28px;
  color:#555555;
  font-family: Georgia;
  line-height: 28px;
  font-style: italic;
}
.bgItem{
background:#f2f2f2;
}
.bgBody{
background:#ffffff;
}
</style>
<script type="colorScheme" class="swatch active">
  {
    "name":"Default",
    "bgBody":"ffffff",
    "link":"d2176e",
    "color":"555555",
    "bgItem":"f2f2f2",
    "title":"555555"
  }
</script>

</head>
<body paddingwidth="0" paddingheight="0" bgcolor="#d1d3d4"  style="padding-top: 0; padding-bottom: 0; padding-top: 0; padding-bottom: 0; background-repeat: repeat; width: 100% !important; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; -webkit-font-smoothing: antialiased;" offset="0" toppadding="0" leftpadding="0">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tableContent bgBody" align="center" bgcolor="#FFFFFF" style='font-family:Georgia, serif;'>
    <!-- =============== START HEADER =============== -->
  <tr>
    <td align='center' bgcolor="#2579e9" class="">
      <table width="560" border="0" cellspacing="0" cellpadding="0" align="center" >
        <tr>
 <!-- =============== END HEADER =============== -->
          <!-- =============== START BODY =============== -->
          <td align='center' class='movableContentContainer'>


          <div class='movableContent'>
            <table width="560" border="0" cellspacing="0" cellpadding="0" align="center">
              <tr>
                <td align='center'>
                  <table width="560" border="0" cellspacing="0" cellpadding="0" align="center">
                    <tr><td height='10'></td></tr>
                    <tr>
                      <td width="414">
                        <div class="contentEditableContainer contentImageEditable">
                          <div class="contentEditable" align='left'>
                            <img src="http://multi-byte.co.uk/static6/logo.png" alt='logo' data-default="placeholder"/>
                            </div>
                          </div>
                      </td>
                      </tr>
                    <tr><td height='10'></td></tr>
                  </table>
                </td>
              </tr>
            </table>
          </div>

          <div class='movableContent'>
            <table width="560" border="0" cellspacing="0" cellpadding="0" align="center">
              <tr>
                <td>
                  <table width="560" border="0" cellspacing="0" cellpadding="0" align="center">
                    <tr>
                      <td>
                        <div class="contentEditableContainer contentImageEditable">
                          <div class="contentEditable" align='left'>
                            <img src="http://multi-byte.co.uk/static6/header.jpg" alt='header' data-default="placeholder" data-max-width='560' width='560' height='242' />
                          </div>
                        </div>
                      </td>
                    </tr>
                    <tr>
                      <td class='bgItem'>
                        <table width="560" border="0" cellspacing="0" cellpadding="0" align="center">
                          <tr><td height='38'></td></tr>
                          <tr>
                            <td>
                              <div class="contentEditableContainer contentTextEditable">
                                <div class="contentEditable">
                                  <h2 style='font-size:38px;text-align:center;'>Welcome {contact.first_name}</h2>
                                </div>
                              </div>
                            </td>
                          </tr>
                          <tr><td height='20'></td></tr>
                          <tr><td height='5' align='center'><hr style='width:117px; height:5px; background-color:#f95732;border:none;'/></td></tr>
                          <tr><td height='20'></td></tr>
                          <tr>
                            <td>
                              <div class="contentEditableContainer contentTextEditable">
                                <div class="contentEditable" style='font-size:16px;color:#555555;text-align:center;line-height:24px;font-style:italic;'>
                                  <p>Your MultiByte account is setup and ready for you to start adding services. Displayed below are details regarding your account information. </p>
                                  <p></p>
                                  <p>We hope you enjoy your time with us and please do not hesitate to get in touch if you need us. </p>
                                </div>
                              </div>                  
                            </td>
                          </tr>
                          <tr><td height='38'></td></tr>
                        </table>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
              <tr><td height='10'></td></tr>
            </table>
          </div>
          <div class='movableContent'>
              <table width="560" border="0" cellspacing="0" cellpadding="0" align="center">
                <tr><td height='10'></td></tr>
                <tr>
                  <td class='bgItem'>
                    <table width="560" border="0" cellspacing="0" cellpadding="0" align="center">
                      <tr><td height='38'></td></tr>
                      <tr>
                        <td>
                          <div class="contentEditableContainer contentTextEditable">
                            <div class="contentEditable">
                              <h2 style='line-height: 28px;font-style: italic;text-align:center;font-size:28px;'>Your Account Details.</h2>
                            </div>
                          </div>
                        </td>
                      </tr>
                      <tr><td height='20'></td></tr>
                      <tr><td height='5' align='center'><hr style='width:117px; height:5px; background-color:#f95732;border:none;'/></td></tr>
                      <tr><td height='20'></td></tr>
                      <tr>
                        <td>
                          <table>
                            <tr>
                              <td width='30'></td>
                              <td align="center">
                                <div class="contentEditableContainer contentTextEditable">
                                  <div class="contentEditable" style='font-size:16px;color:#555555;text-align:left;line-height:24px;font-style:italic;'>
                                    <p>Below are your full account details. You can use these details to gain access to our Client Area and Support System.</p><br/></div>
                                  <div class="contentEditable" style='font-size:14px;color:#555555;text-align:left;line-height:24px; font-style:italic; font-family:Verdana;'>
                                    <p>Sign-up Reference: <strong>SG-MULTIH-037272</strong><br/>Username: <strong>{username}</strong><br>
                                  Password:<strong>(Use Sign-up Password)</strong></p></div><br/><br/>
                                    
                                    <div class="contentEditable" style='font-size:16px;color:#555555;line-height:24px;font-style:italic;'>
                                    <p><a href="http://multi-byte.co.uk/login.php"><img src="http://multi-byte.co.uk/static6/myaccount.png" width="249" height="27" /></a></p></div>
                                </div>     
                              </td>
                              <td width='30'></td>
                            </tr>
                          </table>
                        </td>
                      </tr>
                      <tr><td height='38'></td></tr>
                      <tr>
                        <td height="18" align='center'></td>
                      </tr>
                    </table>
                  </td>
                </tr>
                <tr><td height='10'></td></tr>
              </table>
            </div>
            <div class='movableContent'>
              <table width="560" border="0" cellspacing="0" cellpadding="0" align="center">
                <tr><td height='10'></td></tr>
                <tr>
                  <td class='bgItem' align='center'>
                    <table width="560" border="0" cellspacing="0" cellpadding="0" align="center">
                      <tr><td height='50' colspan="8"></td></tr>
                      <tr>
                        <td width='50'></td>
                        <td width='200' style='padding-top:14px;'>
                          <div class='contentEditableContainer contentTextEditable'>
                            <div class='contentEditable' style='font-size:16px;color:#555555;line-height: 24px;'>
                              <p>
                                Useful Links<a href="http://multibyte-group.com/support"><br>
                                Support System</a><br />
                                <a href="http://multi-byte.co.uk/webmail">Webmail Login</a><br />
                              <a href="http://multi-byte.co.uk/cpanel">CPanel Login</a> </p>
                            </div>
                          </div>
                        </td>
                        <td width='30'></td>
                        <td width='70'>
                          <div class='contentEditableContainer contentFacebookEditable'>
                            <div class='contentEditable'> <a href="https://www.facebook.com/multibyte/"><img src="http://multi-byte.co.uk/static6/facebook.png"   data-max-width="70" width='70' height='70' alt='facebook' data-customIcon="true"/></a>
                            </div>
                          </div>
                        </td>
                        <td width='10'></td>
                        <td width='70'>
                          <div class='contentEditableContainer contentTwitterEditable'>
                            <div class='contentEditable'><a href="https://twitter.com/MultibyteWeb"><img src="http://multi-byte.co.uk/static6/twitter.png"  data-max-width="70" width='70' height='70' alt='Twitter' data-customIcon="true"/></a>
                            </div>
                          </div>
                        </td>
                        <td width='10'></td>
                        <td width='50'></td>
                      </tr>
                      <tr><td height='50' colspan="8"></td></tr>
                    </table>
                  </td>
                </tr>
                <tr><td height='10'></td></tr>
              </table>
            </div>


            <div class='movableContent'>
            <table width="560" border="0" cellspacing="0" cellpadding="0" align="center">
              <tr><td height='10'></td></tr>

              <tr><td><div style='border-top:1px solid #555555;'></div></td></tr>

              <tr><td height='20'></td></tr>

              <tr>
                <td align='center'>
                  <table width="560" border="0" cellspacing="0" cellpadding="0" align="center">
                    <tr>
                      <td width="560" align="center">
                        <div class="contentEditableContainer contentTextEditable">
                          <div class="contentEditable" style='color:#fff;text-align:center;font-size:11.5px;line-height:19px;'>
                            <p>MultiByte Web Services, Suite 1049, Vernon House Nottingham, NG1 6DQ.<br/>MultiByte Group Limited, Registered in England & Wales, Company Registration Number 09992551</p></div>
                        </div>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </div>


          </td>
        </tr>

        <!-- =============== END BODY =============== -->

<!-- =============== START FOOTER =============== -->
        

        <tr><td height='20'></td></tr>
<!-- =============== END FOOTER =============== -->


      </table>
    </td>
  </tr>
</table>

Link to comment
Share on other sites

  • 0

The braces used by styles and JavaScript (i.e. { and }), conflict with the H2o parser for tag replacement in email templates. The parser expects variables to be between the braces, e.g., {service.name}, but since you have CSS styles defined, you have { padding-top: 0 !important; ... }, which is invalid H2o tag syntax.

 

You can either use inline-styles instead, or you can update your config file in /config/blesta.php to change the characters used by the H2o parser to something else, like two braces. The latter requires every area in Blesta that defines variables parseable by H2o (e.g. the portal, all email templates, package welcome email templates, the universal module, etc.) to be updated to use the new characters you define.

 

I also notice that you are defining a lot of base HTML tags, like the body and head tags. I presume this is a "full-page template", but the WYSIWYG does not support this by default. The WYSIWYG will strip your html, head, and body tags. To keep them, you would need to update the ckeditor configuration.

i.e. Update /vendors/ckeditor/config.js and find at the bottom of the file:

config.entities = false;

And add below it:

config.fullPage = true;

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...