Home > Archive > PHP Smarty Templates > October 2004 > SV: SV: [SMARTY] bug in block_function handling?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
SV: SV: [SMARTY] bug in block_function handling?
|
|
| Paolo Nesti Poggi 2004-10-21, 8:57 am |
| > -----Oprindelig meddelelse-----
> Fra: messju mohr [mailto:messju@lammfellpuschen.de]
....
> convention for
>
> 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');
$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
| |
| Messju Mohr 2004-10-22, 8:57 am |
| On Thu, Oct 21, 2004 at 02:20:35PM +0200, Paolo Nesti Poggi wrote:
>
> ...
>
>
> 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
|
|
|
|
|