View previous topic :: View next topic |
Author |
Message |
yourke Smarty Rookie
Joined: 14 Dec 2010 Posts: 6
|
Posted: Thu Oct 20, 2011 4:07 am Post subject: clearCompiledTemplate BUG |
|
|
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 |
|
rodneyrehm Administrator
Joined: 30 Mar 2007 Posts: 674 Location: Germany, border to Switzerland
|
Posted: Thu Oct 20, 2011 12:51 pm Post subject: |
|
|
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 |
|
yourke Smarty Rookie
Joined: 14 Dec 2010 Posts: 6
|
Posted: Thu Oct 20, 2011 3:05 pm Post subject: |
|
|
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 |
|
rodneyrehm Administrator
Joined: 30 Mar 2007 Posts: 674 Location: Germany, border to Switzerland
|
Posted: Thu Oct 20, 2011 3:54 pm Post subject: |
|
|
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 |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Thu Oct 20, 2011 4:07 pm Post subject: |
|
|
There is a typo
$smarty->clearCompiledTemplate("tset/test.tpl");
should be
$smarty->clearCompiledTemplate("test/test.tpl"); |
|
Back to top |
|
yourke Smarty Rookie
Joined: 14 Dec 2010 Posts: 6
|
Posted: Thu Oct 20, 2011 4:29 pm Post subject: |
|
|
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 |
|
rodneyrehm Administrator
Joined: 30 Mar 2007 Posts: 674 Location: Germany, border to Switzerland
|
Posted: Thu Oct 20, 2011 4:32 pm Post subject: |
|
|
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 |
|
|