|
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 |
tiberian Smarty Rookie
Joined: 19 Aug 2003 Posts: 5 Location: Germany, Wadersloh
|
Posted: Wed Nov 11, 2009 8:45 am Post subject: Bug/Error in smarty_internal_compile_include |
|
|
Hi there,
i just wanted to check out the new Version in a larger project. After including all new Files from beta1 I get this error Message:
Code: | Fatal error: Call to undefined method Smarty_Internal_Resource_File::getTemplateTimestampTypeName() in …/lib/Smarty3/sysplugins/smarty_internal_compile_include.php on line 54 |
I tried to figure out what's going wrong, but I didn't get the idea.
Is it a bug? Or am I'm something wrong?
Thanks! |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Wed Nov 11, 2009 5:07 pm Post subject: |
|
|
Have you used the latest version from the SVN? it does include some bugfixes |
|
Back to top |
|
tiberian Smarty Rookie
Joined: 19 Aug 2003 Posts: 5 Location: Germany, Wadersloh
|
Posted: Thu Nov 12, 2009 10:31 am Post subject: |
|
|
Yes, I used latest SVN co (Rev. 3329) |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Thu Nov 12, 2009 2:22 pm Post subject: |
|
|
Did you clear out compiled templates after an SVN update? |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Thu Nov 12, 2009 4:19 pm Post subject: |
|
|
There is another possibility.
Smarty 2 was a bit more forgiving (and ambiguous) when it comes to unquoted strings in parameters. Smarty3 is more restrictive. You can still pass strings without quotes so long as they contain no special characters. (anything outside of A-Za-z0-9_)
So filename string should be specified with quotes like
{include file='path/foo.tpl'} normally I would expect that you get an error if this is not the case, but please check.
I that is okay please place a var_dump in file smarty_internal_compile_include.php that around line 53 it looks like this:
$tpl->parseResourceName($_file_to_check[0], $resource_type, $resource_name, $resource_handler);
var_dump($_file_to_check[0], $resource_type, $resource_name);
It looks like that for some reasion the file dependency information got destructed. |
|
Back to top |
|
moob Smarty n00b
Joined: 02 Feb 2012 Posts: 1
|
Posted: Thu Feb 02, 2012 9:24 am Post subject: |
|
|
Pay atention to the paths in the include function. Incorrect path in include returns this error.
Depends on the absolute path of the file from where you are calling the template that contains include.
Code: | {include file='blackmenu.tpl'} |
or
Code: | {include file='../../smarty/templates/blackmenu.tpl'} |
|
|
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
|