|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
ryanhargrave Smarty n00b
Joined: 01 Nov 2009 Posts: 4
|
Posted: Tue Nov 03, 2009 2:04 pm Post subject: Not compiling template first time |
|
|
I have an issue if I set compile_check = false and I clear the compile directory, it is not generating the compile files. It keeps trying to find the compiled files that aren't there.
but if I toggle it to compile_check = true load the pages and then back to compile_check = false it works just fine.
Has anyone experienced Smarty not generating the compiled templates when compile_check = false? |
|
Back to top |
|
ryanhargrave Smarty n00b
Joined: 01 Nov 2009 Posts: 4
|
Posted: Tue Nov 03, 2009 2:58 pm Post subject: |
|
|
seems like the problem is in the renderTemplate method. When the following "if" statement is run:
Code: |
if ($this->mustCompile() && $this->compiled_template === null) {
$this->compileTemplateSource();
}
|
I think it should actually be using an "or" here. Because if you are using the compiler it needs to compile the template if mustCompile() is true or if there is no current compiled template already generated.
this is also a problem when including templates from inside a template as it calls the getCompiledTemplate method which also has the logic possible incorrect.
Not sure if the place to do that is in the renderTemplate method or the mustCompile method as I don't know what else they effect. |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Tue Nov 03, 2009 6:01 pm Post subject: |
|
|
The correct fix is in the SVN now |
|
Back to top |
|
|
|
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
|