[SOLVED] content not loading with smarty cache enabled
Posted: Thu Aug 09, 2012 1:43 am
After the upgrade from 1.10.3 to 1.11 i have a problem on two templates that use multiple content blocks that are wrapped in an if statement:
however, with [edit] smarty [end edit] caching enabled, anything wrapped in these type of if statements don't load. (view page source - content not there). browser thinks page loaded successfully. when I disable the if statement things work/load fine. Is there a syntax error in the if statement?
EDIT: I tried empty() with not and !, then tried different styles of qualifiers (!= ne neq) '' (leaving spaces on either side). still no luck.
Edit: 1.10.3 defined IF_FUNCS in
/lib/smarty/Smarty.class.php
1.11 does not. Relevant?
Cheers, Mario
CMSMS 1.11
CMSMailer 5.2.1
FileManager 1.4.0
MenuManager 1.8.2
ModuleManager 1.5.5
News 2.12.7
Search 1.7.6
TinyMCE 2.10.1
CGSimpleSmarty 1.5.2
CGExtensions 1.30
CGBlog 1.9.8
CGFeedback 1.5.7
Captcha 0.4.5
FormBuilder 0.7.3
IE6Warning 1.03
Showtime 3.2
CMSPrinting 1.0.2
Server: Linux Debian Lenny 2.6.26-1-686 kernel
apache 2.2.9-10
mysql 5.0.51a-24
php 5.2.6-1
Code: Select all
{content block="tab_one" label="Title for 1st tab" assign=tab_one oneline="true"}
{if !empty($tab_one)} <div class="pane" id="pane1"> {content block="pane_one" label="Content for 1st pane"}</div> {/if}
{content block="tab_two" label="Title for 2nd tab" assign="tab_two" oneline="true"}
{if !empty($tab_two)} <div class="pane" id="pane2">{content block="pane_two" label="Content for 2nd pane"}</div> {/if}
and so on.
EDIT: I tried empty() with not and !, then tried different styles of qualifiers (!= ne neq) '' (leaving spaces on either side). still no luck.
Edit: 1.10.3 defined IF_FUNCS in
/lib/smarty/Smarty.class.php
Code: Select all
var $security_settings = array(
'PHP_HANDLING' => false,
'IF_FUNCS' => array('array', 'list',
'isset', 'empty',
'count', 'sizeof',
'in_array', 'is_array',
'true', 'false', 'null'),
'INCLUDE_ANY' => false,
'PHP_TAGS' => false,
'MODIFIER_FUNCS' => array('count'),
'ALLOW_CONSTANTS' => false,
'ALLOW_SUPER_GLOBALS' => true
);
Cheers, Mario
CMSMS 1.11
CMSMailer 5.2.1
FileManager 1.4.0
MenuManager 1.8.2
ModuleManager 1.5.5
News 2.12.7
Search 1.7.6
TinyMCE 2.10.1
CGSimpleSmarty 1.5.2
CGExtensions 1.30
CGBlog 1.9.8
CGFeedback 1.5.7
Captcha 0.4.5
FormBuilder 0.7.3
IE6Warning 1.03
Showtime 3.2
CMSPrinting 1.0.2
Server: Linux Debian Lenny 2.6.26-1-686 kernel
apache 2.2.9-10
mysql 5.0.51a-24
php 5.2.6-1