Uploads 1.23.3 throws template compile error

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
rvwilliams
Forum Members
Forum Members
Posts: 61
Joined: Wed Oct 05, 2011 9:59 am

Uploads 1.23.3 throws template compile error

Post by rvwilliams »

I have an upload template for the Uploads module that works perfectly well with CMSMS 2.0.1.1 and Uploads 1.20.1. However on CMSMS 2.1.4 and Uploads 1.23.3 it throws an error

Code: Select all

Syntax error in template "content:content_en"  on line 3 "

{cms_module module="Uploads" category="minutes" mode="upload"  template="my_upload" file_extensions="pdf"}
"  - Unexpected ";", expected one of: "}"

#0 /home/sites/mysite.org.uk/public_html/lib/smarty/sysplugins/smarty_internal_templateparser.php(3135): Smarty_Internal_TemplateCompilerBase->trigger_template_error()
#1 /home/sites/mysite.org.uk/public_html/lib/smarty/sysplugins/smarty_internal_templateparser.php(3199): Smarty_Internal_Templateparser->yy_syntax_error(25, ';')
#2 /home/sites/mysite.org.uk/public_html/lib/smarty/sysplugins/smarty_internal_smartytemplatecompiler.php(111): Smarty_Internal_Templateparser->doParse(25, ';')
#3 /home/sites/mysite.org.uk/public_html/lib/smarty/sysplugins/smarty_internal_templatecompilerbase.php(273): Smarty_Internal_SmartyTemplateCompiler->doCompile('<h2><span style...')
#4 /home/sites/mysite.org.uk/public_html/lib/smarty/sysplugins/smarty_internal_template.php(186): Smarty_Internal_TemplateCompilerBase->compileTemplate(Object(Smarty_Internal_Template))
#5 /home/sites/mysite.org.uk/public_html/lib/smarty/sysplugins/smarty_internal_templatebase.php(163): Smarty_Internal_Template->compileTemplateSource()
#6 /home/sites/mysite.org.uk/public_html/lib/classes/internal/class.CMS_Content_Block.php(290): Smarty_Internal_TemplateBase->fetch('content:content...', '|content_en', '65content_en')
#7 /home/sites/mysite.org.uk/public_html/tmp/templates_c/c1b18d9e612b70b38b8547563409f9a862ab2646.tpl_body.18.php(38): CMS_Content_Block::smarty_internal_fetch_contentblock(Array, Object(Smarty_Internal_Template))
#8 /home/sites/mysite.org.uk/public_html/lib/smarty/sysplugins/smarty_internal_templatebase.php(182): content_57a367719d6110_75614180(Object(Smarty_Internal_Template))
#9 /home/sites/mysite.org.uk/public_html/index.php(160): Smarty_Internal_TemplateBase->fetch()
#10 {main}
The same thing happens when I omit a template, so I'm not sure that the error is within my template code. How can I find out exactly what is causing the smarty complier to throw this error? Where is {startform} defined?
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1978
Joined: Mon Jan 29, 2007 4:47 pm

Re: Uploads 1.23.3 throws template compile error

Post by Jo Morg »

rvwilliams wrote:Syntax error in template "content:content_en" on line 3 "
This means that you have a syntax error on the page content, not on any particular template. Technically content blocks are still templates as they are parsed by smarty.
rvwilliams wrote:Unexpected ";", expected one of: "}"
For some reason there is a ";" somewhere on that page main content block that is breaking Smarty parsing.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
rvwilliams
Forum Members
Forum Members
Posts: 61
Joined: Wed Oct 05, 2011 9:59 am

Re: Uploads 1.23.3 throws template compile error

Post by rvwilliams »

Yes, I understood the meaning of the error message. I suspect that the error is in {startform} but I don't know where to locate it. The trace shows the start of a parse of <h2><span> and that code isn't in my template but it is on the final page as viewed in the previous version, so it can only be contained in {startform}.
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1978
Joined: Mon Jan 29, 2007 4:47 pm

Re: Uploads 1.23.3 throws template compile error

Post by Jo Morg »

Because tags are parsed and replaced recursively I don't think that is the problem. Besides, {startform} is a tag that just renders the <form...> HTML tag eventually with a few additional hidden fields. However you would probably find it on the 'my_upload' template, used explicitly by the Uploads tag call... In any case, make sure you clear the CMSMS cache, just in case.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
rvwilliams
Forum Members
Forum Members
Posts: 61
Joined: Wed Oct 05, 2011 9:59 am

Re: Uploads 1.23.3 throws template compile error

Post by rvwilliams »

I've tried with no template and also with the example template and, both times, the same error occurs so I don't think it's my template that is at fault.
rvwilliams
Forum Members
Forum Members
Posts: 61
Joined: Wed Oct 05, 2011 9:59 am

SOLVED: Uploads 1.23.3 throws template compile error

Post by rvwilliams »

Sorry, the fault was mine. I eventually found the error and corrected it. However that then revealed a problem with the Uploads module where the code to detect a mode of 'upload' has been dropped from action_default.php, and all upload requests are treated as 'summary'. I will report this as a possible bug.
Post Reply

Return to “Modules/Add-Ons”