Page 1 of 1

CMS error

Posted: Wed Jun 19, 2019 5:07 pm
by nfld

We are currently using CMS Made Simple™ 1.12.1 for our web content. We have a page which has a link contact us which when we click it we get the following error.

I am new to CMS software and the guy who looked after our site is no longer reachable and trying to resolve.

Any help would be greatly appreciated

ERROR: at line 11 in file /services/webpages/w/e/
Syntax error in template "content:content_en" on line 11 "!function(d,s,id){js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);;js.src=p+'://';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');" - Unexpected ",", expected one of: "}"
Close Full Trace ↑
#0 /services/webpages/w/e/ Smarty_Internal_TemplateCompilerBase->trigger_template_error()
#1 /services/webpages/w/e/ Smarty_Internal_Templateparser->yy_syntax_error(38, ',')
#2 /services/webpages/w/e/ Smarty_Internal_Templateparser->doParse(38, ',')
#3 /services/webpages/w/e/ Smarty_Internal_SmartyTemplateCompiler->doCompile('<h1>Contact Us<...')
#4 /services/webpages/w/e/ Smarty_Internal_TemplateCompilerBase->compileTemplate(Object(Smarty_Internal_Template))
#5 /services/webpages/w/e/ Smarty_Internal_Template->compileTemplateSource()
#6 /services/webpages/w/e/ Smarty_Internal_TemplateBase->fetch('content:content...', 'p252|content_en', '252content_en', NULL, false, false, false)
#7 /services/webpages/w/e/ Smarty_CMS->fetch('content:content...', '|content_en', '252content_en')
#8 /services/webpages/w/e/ CMS_Content_Block::smarty_internal_fetch_contentblock(Array, Object(Smarty_Internal_Template))
#9 /services/webpages/w/e/ content_5cd587a97de089_49283656(Object(Smarty_Internal_Template))
#10 /services/webpages/w/e/ Smarty_Internal_TemplateBase->fetch('tpl_body:24', 'p252', NULL, NULL, false, false, false)
#11 /services/webpages/w/e/ Smarty_CMS->fetch('tpl_body:24')
#12 {main}

Re: CMS error

Posted: Thu Jun 20, 2019 3:22 pm
by nfld
just wondering if anyone things this could be related to the version of this software

Re: CMS error

Posted: Thu Jun 20, 2019 9:01 pm
by velden
Of course it would be good to upgrade to the most recent version.

That said, to me it seems like the specific page has javascript code in the content area.

CMSMS uses the Smarty template engine which considers curly brackets
{} as special characters.
Try to put the javascript code inside {literal} tag:.

Code: Select all

{literal}[your js code here]{/literal}

Another option would be to type a space around every occurrence of { and } in the javascript code (actual details may be different but this should work)