Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

clearCompiledTemplate BUG

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Bugs
View previous topic :: View next topic  
Author Message
yourke
Smarty Rookie


Joined: 14 Dec 2010
Posts: 6

PostPosted: Thu Oct 20, 2011 4:07 am    Post subject: clearCompiledTemplate BUG Reply with quote

Code:


$smarty = new Smarty();
$smarty->setUseSubDirs(true);
/* more settings */

$smarty->display("xxx.tpl");
/* compiled template exists */

$smarty->clearCompiledTemplate("xxx.tpl");
/* compiled template still exists !!! */

Back to top
View user's profile Send private message
rodneyrehm
Administrator


Joined: 30 Mar 2007
Posts: 674
Location: Germany, border to Switzerland

PostPosted: Thu Oct 20, 2011 12:51 pm    Post subject: Reply with quote

Which version are you using? I'm fairly certain that Smarty 3.1.4 works as intended (as I just rewrote the unit tests for clearCompiledTemplate() coverage)
_________________
Twitter
Back to top
View user's profile Send private message Visit poster's website
yourke
Smarty Rookie


Joined: 14 Dec 2010
Posts: 6

PostPosted: Thu Oct 20, 2011 3:05 pm    Post subject: Reply with quote

sorry, this happened when template was in a sub dir.

Code:

require_once('distribution/libs/Smarty.class.php');

$smarty = new Smarty();
$smarty->setUseSubDirs(true);
/* more settings */

$smarty->display("test/test.tpl");
/* compiled template exists */

$smarty->clearCompiledTemplate("tset/test.tpl");
/* compiled template still exists !!! */
[/code]
Back to top
View user's profile Send private message
rodneyrehm
Administrator


Joined: 30 Mar 2007
Posts: 674
Location: Germany, border to Switzerland

PostPosted: Thu Oct 20, 2011 3:54 pm    Post subject: Reply with quote

I updated the test case again. Made sure to include templates from sub-directories and multiple template_dir sources. Still can't confirm your bug.

And I still don't know which version you're testing with…
_________________
Twitter
Back to top
View user's profile Send private message Visit poster's website
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Thu Oct 20, 2011 4:07 pm    Post subject: Reply with quote

There is a typo
$smarty->clearCompiledTemplate("tset/test.tpl");

should be

$smarty->clearCompiledTemplate("test/test.tpl");
Back to top
View user's profile Send private message
yourke
Smarty Rookie


Joined: 14 Dec 2010
Posts: 6

PostPosted: Thu Oct 20, 2011 4:29 pm    Post subject: Reply with quote

U.Tews wrote:
There is a typo
$smarty->clearCompiledTemplate("tset/test.tpl");

should be

$smarty->clearCompiledTemplate("test/test.tpl");


Not the point,
I Use :
Code:

===== SVN trunk  =====
17/03/2011
- bugfix on default {function} parameters when {function} was used in nocache sections
- bugfix on compiler object destruction. compiler_object property was by mistake unset.

Back to top
View user's profile Send private message
rodneyrehm
Administrator


Joined: 30 Mar 2007
Posts: 674
Location: Germany, border to Switzerland

PostPosted: Thu Oct 20, 2011 4:32 pm    Post subject: Reply with quote

Wow… that's a pretty old 3.0 Version. Have you tried upgrading to a more recent version (say the current trunk)?
_________________
Twitter
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Bugs All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP