 |
Smarty
The discussions here are for Smarty, a template engine for the PHP programming language. Dedicated server web hosting provided by Guru-host.eu. |
| View previous topic :: View next topic |
| Author |
Message |
firepages Smarty Rookie
Joined: 03 May 2012 Posts: 6
|
Posted: Tue May 08, 2012 7:56 am Post subject: debug.tpl errors, but not subclassing |
|
|
hi,
when I use {debug}
I get ...
| Code: |
[Tue May 08 15:50:31 2012] [error] [client 127.0.0.1] PHP Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "/home/httpd/vhosts/srv.blah.com.au/clib/smarty/libs/debug.tpl" on line 89 "<h1>Smarty Debug Console - {if isset($template_name)}{$template_name|debug_print_var nofilter}{else}Total Time {$execution_time|string_format:"%.5f"}{/if}</h1>" unknown modifier "debug_print_var"' in /home/httpd/vhosts/srv.blah.com.au/clib/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php:627\nStack trace:\n#0 /home/httpd/vhosts/srv.blah.com.au/clib/smarty/libs/sysplugins/smarty_internal_compile_private_modifier.php(73): Smarty_Internal_TemplateCompilerBase->trigger_template_error('unknown modifie...', 89)\n#1 /home/httpd/vhosts/srv.blah.com.au/clib/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php(439): Smarty_Internal_Compile_Private_Modifier->compile(Array, Object(Smarty_Internal_SmartyTemplateCompiler), Array, NULL, NULL)\n#2 /home/httpd/vhosts/srv.blah.com.au/clib/smarty/libs/sysplugi in /home/httpd/vhosts/srv.blah.com.au/clib/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php on line 627
[Tue May 08 15:50:31 2012] [debug] mod_deflate.c(615): [client 127.0.0.1] Zlib: Compressed 0 to 2 : URL /fpa_admin.htm
|
now I saw http://www.smarty.net/forums/viewtopic.php?p=68808 but I am not subclassing , however I am passing the smarty instance around.. e.g.
$smarty=new Smarty;
$yaks=new other_class($smarty);etc
the other_class does reference smarty though and then it gets used with $this->...
__construct(&$smarty){
$this->smarty=$smarty;
in fact within other_class $smarty gets passeda round a lot , not sure if this is a problem, any ideas ? |
|
| Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 4173 Location: Hamburg / Germany
|
Posted: Tue May 08, 2012 8:22 pm Post subject: |
|
|
It looks like that the plugins folder of the distribution is not accessable. It does contain the debug_print_var modifier which could not be found. Did you configure the $plugins_dir property of Smarty?
You can run $smarty->testInstall(); to check your configuration. |
|
| Back to top |
|
firepages Smarty Rookie
Joined: 03 May 2012 Posts: 6
|
Posted: Tue May 08, 2012 11:06 pm Post subject: solved, thankyou |
|
|
thankyou! , I had added my own plugin dir
$smarty->plugins_dir = FP_FILE_ROOT.'/data/res/smarty';
now changed to
$smarty->plugins_dir = array(FP_FILE_ROOT.'/data/res/smarty',FP_LIB.'/smarty/libs/plugins');
and all working as expected, cheers! |
|
| 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
|