Page 1 of 1

[solved] Syntax error in template "content:content_en"

Posted: Fri Jun 06, 2014 3:58 pm
by cnymike
My client was editing and saved a page. He is getting an error when attempting to navigate to the page or view the page in preview.

Here is the URL of the page that throws the error:
http://www.fcap.org/index.php?page=shaping-our-cultures

This is the error and the Trace:

Code: Select all

ERROR: at line 34 in file /usr/www/users/******/fcap/lib/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php:

Message:

Syntax error in template "content:content_en"  on line 34 "{mso-style-name:"Table Normal";"  - Unexpected ":", expected one of: "}"
Close Full Trace ↑
#0 /usr/www/users/******/fcap/lib/smarty/libs/sysplugins/smarty_internal_templateparser.php(3135): Smarty_Internal_TemplateCompilerBase->trigger_template_error()
#1 /usr/www/users/******/fcap/lib/smarty/libs/sysplugins/smarty_internal_templateparser.php(3199): Smarty_Internal_Templateparser->yy_syntax_error(2, ':')
#2 /usr/www/users/******/fcap/lib/smarty/libs/sysplugins/smarty_internal_smartytemplatecompiler.php(111): Smarty_Internal_Templateparser->doParse(2, ':')
#3 /usr/www/users/******/fcap/lib/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php(273): Smarty_Internal_SmartyTemplateCompiler->doCompile('<!DOCTYPE html ...')
#4 /usr/www/users/******/fcap/lib/smarty/libs/sysplugins/smarty_internal_template.php(186): Smarty_Internal_TemplateCompilerBase->compileTemplate(Object(Smarty_Internal_Template))
#5 /usr/www/users/******/fcap/lib/smarty/libs/sysplugins/smarty_internal_templatebase.php(149): Smarty_Internal_Template->compileTemplateSource()
#6 /usr/www/users/******/fcap/lib/classes/class.Smarty_CMS.php(326): Smarty_Internal_TemplateBase->fetch('content:content...', 'p391|content_en', '391content_en', NULL, false, false, false)
#7 /usr/www/users/******/fcap/lib/classes/class.CMS_Content_Block.php(327): Smarty_CMS->fetch('content:content...', '|content_en', '391content_en')
#8 /usr/www/users/******/fcap/tmp/templates_c/c1b18d9e612b70b38b8547563409f9a862ab2646.tpl_body.18.php(123): CMS_Content_Block::smarty_internal_fetch_contentblock(Array, Object(Smarty_Internal_Template))
#9 /usr/www/users/******/fcap/lib/smarty/libs/sysplugins/smarty_internal_templatebase.php(182): content_5391e0c3eb75e0_17537580(Object(Smarty_Internal_Template))
#10 /usr/www/users/******/fcap/lib/classes/class.Smarty_CMS.php(326): Smarty_Internal_TemplateBase->fetch('tpl_body:18', 'p391', NULL, NULL, false, false, false)
#11 /usr/www/users/******/fcap/index.php(240): Smarty_CMS->fetch('tpl_body:18')
#12 {main}
Here is my system report:

----------------------------------------------
Cms Version: 1.11.10
Installed Modules:
CMSMailer: 5.2.2
Captcha: 0.4.6
MenuManager: 1.8.6
ModuleManager: 1.5.5
News: 2.14.2
Search: 1.7.11
FormBuilder: 0.7.3
FileManager: 1.4.4
Printing: 1.1.2
TinyMCE: 2.9.12
CMSPrinting: 1.0.5
MicroTiny: 1.2.6
FormBrowser: 0.4.2
FCKeditorX: 1.1.0

Config Information:
php_memory_limit:
process_whole_template: 1
max_upload_size: 15000000
url_rewriting: none
page_extension:
query_var: page
image_manipulation_prog: GD
auto_alias_content: true
locale:
default_encoding:
admin_encoding: utf-8
set_names: false

Php Information:
phpversion: 5.3.15
md5_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_STRICT: 0
E_DEPRECATED: 8192
memory_limit: 64M
max_execution_time: 240
output_buffering: On
safe_mode: Off (False)
file_uploads: On (True)
post_max_size: 15M
upload_max_filesize: 15M
session_save_path: /tmp (1777)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)

Server Information:
Server Api: cgi-fcgi
Server Db Type: MySQL (mysql)
Server Db Version: 5.0.96
Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable
Server Time Diff: No filesystem time difference found

----------------------------------------------

I've cleared the cache and have also checked that {cms_stylesheet} is being used instead of {stylesheet} in my site template.

The error says:
Syntax error in template "content:content_en" on line 34 "{mso-style-name:"Table Normal";" - Unexpected ":", expected one of: "}"

I cannot not find a template file named "content:content_en".

If someone could point me in the right direction I'd be grateful.

Re: Syntax error in template "content:content_en"

Posted: Fri Jun 06, 2014 4:04 pm
by Jo Morg
cnymike wrote:Syntax error in template "content:content_en" on line 34 "{mso-style-name:"Table Normal";" - Unexpected ":", expected one of: "}"
This is tipical of a copy paste from ms word... it usually carries a lot of garbage that smarty doesn't know how to interpret. The best way to clean is to go to a plain text application and copy from that.
So you or your client should go through all the contents that he pasted from word and clean them up 1st. None of the formatting should be copied from word...

Re: Syntax error in template "content:content_en"

Posted: Fri Jun 06, 2014 4:08 pm
by cnymike
I was just looking through the source code for that page and came to the same conclusion.

Thanks so much for your reply. It's the obvious things that sometimes slip through the cracks.

I've repeatedly told my client to not cut and past Word into the site. Sigh.

Re: [resolved} Syntax error in template "content:content_en"

Posted: Fri Jun 06, 2014 7:45 pm
by chandra
TinyMCE has an option to insert pure text ;).