• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: smarty template errors after upgrading 1.10.3 to 1.11(.2)
PostPosted: Wed Nov 07, 2012 7:45 pm 
Offline
New Member

Joined: Wed Nov 07, 2012 7:08 pm
Posts: 2
hello ,

after upgrading to cmsms version 1.11 I got many smarty errors.
the admin backend works fine.

At frontends view I got an "OMG You broke this page" error site. ???

Syntax Error in template "tpl_body:23" on line 166 "</__html>" unclosed {if} tag

This occures imediately after upgrade.
During upgrade I verified all the files using the checksum file. All upgrade steps were done well without any error or notice ( except a warning about my php version that is 5.2.9 )

How can I locate the template that causes this error?

I disabled all the modules installed ( except CMSPrinting ) but nothing changes.


any suggestions?

thanks in advance

Mike


Top
 Profile  
 
 Post subject: Re: smarty template errors after upgrading 1.10.3 to 1.11(.2
PostPosted: Wed Nov 07, 2012 8:24 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Tue Oct 19, 2004 6:44 pm
Posts: 6934
Location: Fernie British Columbia, Canada
CMSMS 1.11.x uses Smarty v3 ... Smarty3 uses a real lexer and parser, and is therefore much more sensitive to syntax errors than the old smarty2 was.

You will have to fix your syntax errors, particularly watching for unclosed or mismatched quotes.

_________________
Follow me on twitter
--
if you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
----------------
Don't make me angry..... you won't like me when I'm angry....


Top
 Profile  
 
 Post subject: Re: smarty template errors after upgrading 1.10.3 to 1.11(.2
PostPosted: Wed Nov 07, 2012 8:29 pm 
Offline
Forum Members
Forum Members

Joined: Sun Jan 10, 2010 10:59 am
Posts: 135
Hi,
You're not the only one I'm afraid. Luckely I decided to test the upgrade first on a test site (a copy of my production site) and guess what the upgrade failt big time!
I decided to do a fresh install and to copy all content manually. A hefty process given the number of pages. Starting off with copying the templates which became some kind of Russian roulette with trial and error to figure out what needed to be changed to get it to work. I managed to modify the 2 major templates (not understanding how and what are the current rules regarding templates as off version 1.11.2) but as optimistic as I am I started to port the content. The first bunch was just flat content and that went fine. Then I got to the pages calling third party modules, grrr, another series of Russian roulette was needed to get through the first one until I discovered that I had to change the call cms_module into CMS_module. Yes that's right, only changing the first bit into upper case did the trick(???) Where is the logic? At last I got to the point porting the pages using "Hiding Private Content in CMS Made Simple". The associated templates containing the specific Smarty code failed to save. After trying almost everything I gave up and decided to raise it as a bug in FEU. Calguy responded almost immediately explaining that this wasn't a bug but that
Quote:
"it's a change in the way templates are processed in the CMSMS backend"
but suggested also a fix which sadly doesn't work and now I'm stuck. I guess that a lot of 3rd party modules will suffer from the same so my advise for now is to wait with an upgrade until these issues are all resolved. The latest working version I have is 1.10.3. So stick with that or downgrade back to 1.10.3.


Top
 Profile  
 
 Post subject: Re: smarty template errors after upgrading 1.10.3 to 1.11(.2
PostPosted: Wed Nov 07, 2012 10:16 pm 
Offline
New Member

Joined: Wed Nov 07, 2012 7:08 pm
Posts: 2
well ...

I found the "tpl_body:23" references the template with (internal) id 23 - so I looked for that. This was the default template I defined.

I did not find any misspelled tags in it. So I removed the {if}{else}{/if} blocks entirely, just to try it. These changes could _not_ be saved. Trying to save gives an incomplete or empty page. Looking at the servers error-log I found this while saving the temlate:
Code:
PHP Fatal error:  Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "template:appdata;tmp_template"  on line 209 "&lt;/html&gt;" unclosed {if} tag' in /var/www/vhosts/xxx/lib/smarty/sysplugins/smarty_internal_templatecompilerbase.php:656\nStack trace:\n  ... referer: http://xxx/admin/edittemplate.php?_sx_=0e762c67&template_id=23



However .. I edited the template code directly within the templates table - that works. This way I found the block containing the misspelled tag(s) and corrected them. ( I found an {/if}-Tag spelled like this: { /if } - with spaces! - ... that's it ! *damn! )

The problem is solved so far.

- mike -


Top
 Profile  
 
 Post subject: Re: smarty template errors after upgrading 1.10.3 to 1.11(.2
PostPosted: Fri Nov 09, 2012 3:22 am 
Offline
Forum Members
Forum Members

Joined: Mon Nov 26, 2007 4:46 pm
Posts: 190
Same problem. But for large sites with many modules, this is a pain in the butt. Worst upgrade process ever.

First, when I copied the 1.11 files over the 1.10.3 I received a SelfRegistration error. So I opted to upgrade the modules before the core but SelfRegistration required the latest FEU 1.20 and then... An error stating I needed a new version of CMSMS. I was kind of stuck in a bit of a loop.

So I thought I had figured everything out until I tried to edit a page... it was blank. I tried updating the template and on Submit got a 404 error.

Not motivating at all.


Top
 Profile  
 
 Post subject: Re: smarty template errors after upgrading 1.10.3 to 1.11(.2
PostPosted: Fri Nov 09, 2012 4:00 am 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Tue Oct 19, 2004 6:44 pm
Posts: 6934
Location: Fernie British Columbia, Canada
There is not much we can do about this. The Smarty3 parser is much more flexible, and feature rich than the smarty2 one ever was. It is also much more strict about syntax, including quotes and apparently whitespace in tags. Though I haven't yet encountered the whitespace problem myself.

The features of smarty3 do outweigh most of the problems we've encountered. Namely the better merging of javascript into smarty templates, and the template inheritance capabilities.

We are experimenting with ways of improving the template editing experience with smarty3, and hope to have something for CMSMS 1.11.3, but at this point we cannot promise anything.

BTW, Blank screens are indicating a php error. Viewing your error log, or admin log would probably tell you what they were. Or you could enable debug mode.

_________________
Follow me on twitter
--
if you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
----------------
Don't make me angry..... you won't like me when I'm angry....


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Arvixe - A CMSMS Partner