Re: SV: SV: [SMARTY] bug in block_function handling?

From: Date: Fri, 22 Oct 2004 08:35:29 +0000
Subject: Re: SV: SV: [SMARTY] bug in block_function handling?
References: 1 2  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-11913@lists.php.net to get a copy of this message
On Thu, Oct 21, 2004 at 02:20:35PM +0200, Paolo Nesti Poggi wrote: > > -----Oprindelig meddelelse----- > > Fra: messju mohr [mailto:messju@lammfellpuschen.de] > > ... > > > > 3. needing registration - > plugin not following the naming > > convention for > > > function name (but positive for file name) and residing wherever in the > > > application > > > > yes. > > > > > > BTW: do you clear your templates_c and your cache-directory between > > these tests? you should do that when switching around > > plugin-registrations or confusion will never end :) > > > > > > Thank you Messju > > I admit that I forgot to clear the cache_dir :( > and your answer restrict the field of things to try, so I tested the same > example 3 again, > This time after having removed everything both from the templates_c AND from > cache_dir. > > I do get the same error (see below). Furthermore I can tell that when I turn > caching on I succed in getting a page with no error the first time I submit > my form, the error starts from the second time (? might be because of the > compile_check?) > > below is the test: > > In case 3 (registration needed) > In the application I have: > include_once('Smarty/Smarty_nocache_cmpt/block.nc.php'); FWIW you should follow the example from http://smarty.php.net/manual/en/plugins.writing.php : require_once $smarty->_get_plugin_filepath('block', 'nc'); > $smartyDisplay->register_block('nc', 'php_component_nc', false); > > the function is: > function php_component_nc($params, $content, &$this) > { > ... > } > and the template has: > {nc}...{/nc} > > It runs ok with no caching, when I enable caching as by point c) above I > get the following error: > > Fatal error: Smarty error: [in candidate/it.tpl line 29]: [plugin] could not > load plugin file 'block.nc.php' (core.load_plugins.php, line 118) in > /usr/share/munk_php/Smarty-2.6.6/libs/Smarty.class.php on line 1088 > > > Thanks again > Paolo

« previous php.smarty.general (#11913) next »