Page 1 of 1

[SOLVED] Issues with smarty parsing.

Posted: Mon Sep 26, 2011 11:04 pm
by djayb6
Hello,

I am the new webmaster of a website, and i'm also new to CMS Made Simple.

Running CMSMS 1.8.2 "Toliara"
PHP 5.2
Mysql 5.0

In the frontend user management, after logging in, the user has access to certain zones, determined by the group. Here is the zone template:

Code: Select all

{if $ccuser->memberof("aGroup")}   
some text.
{else}
some text
{/if}
The problem is, when adding a new zone based on this template, I get this error
string(142) "Smarty error: [in content:content_en line 1]: syntax error: unidentified token ';memberof("aGroup")' (Smarty_Compiler.class.php, line 1410)"
Parse error: syntax error, unexpected '&' in /home/www/6fc1aa3fc026927a635de77280cbf679/web/tmp/templates_c/175^%%70^707^707A8977%%content%3Acontent_en.php on line 3
So I'm checking of both the working zone and the broken zone in [quote tmp/templates_c[/quote] , and here is what I find:

Working zone:

Code: Select all

<?php if ($this->_tpl_vars['ccuser']->memberof("aGroup")): ?>
Broken zone:

Code: Select all

<?php if ($this->_tpl_vars['ccuser']- & > ;memberof("aGroup")): ?>
Even by copying/pasting the exact html code of an working zone to a new zone, or by deleting all the files in
tmp/templates_c/
, I'm still getting this issue.

Any thoughts ? Thanks.

Re: Issues with smarty parsing.

Posted: Tue Sep 27, 2011 11:33 am
by uniqu3
Don't use TinyMCE for module or template logic. TinyMCE tries to clean up your code meaning that > is converted to >
Use a GCB for the logic or turn WYSIWYG off for that page.

Re: Issues with smarty parsing.

Posted: Tue Sep 27, 2011 11:52 am
by djayb6
Turning off WYSIWYG made it work, thanks a lot !