View previous topic :: View next topic |
Author |
Message |
Hinrich Smarty Rookie
Joined: 18 Apr 2003 Posts: 33
|
Posted: Sun Apr 25, 2004 2:09 pm Post subject: Cache Problem |
|
|
I have a little Problem with the cache. This is the message:
Quote: | Fatal error: Call to undefined function: _smarty_tplfunc_57e805213baa7e7fc03fd34574584c8a_0() in /usr/local/httpd/htdocs/tis/htdocs/includes/smarty/Smarty.class.php on line 1826 |
Smarty-Version: Current CVS
Any hints for an origin of search? |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Sun Apr 25, 2004 2:41 pm Post subject: |
|
|
this is a call to a plugin that was registered non-cacheable. but it seems the compiled include is not loaded properly.
my wild guess: clear cache and templates_c and see if the problem comes back |
|
Back to top |
|
Hinrich Smarty Rookie
Joined: 18 Apr 2003 Posts: 33
|
Posted: Sun Apr 25, 2004 5:52 pm Post subject: |
|
|
messju wrote: | this is a call to a plugin that was registered non-cacheable. but it seems the compiled include is not loaded properly.
my wild guess: clear cache and templates_c and see if the problem comes back |
Yes, indeed, I have declared a block for disable caching as described on the resources here:
[php:1:e8fd1001bd]$this->register_block('nocache', 'vkpTemplateBlockNoCache', false);[/php:1:e8fd1001bd]
$this is a singleton instance of a class which has Smarty as parent class. This instance is called very often. Values are assigned, displayed or fetched (mainly displayed, because the complete output is catched) and values are removed again. I'm using my own resource reader because the templates are located in multiple directories.
vkpTemplateBlockNoCache is a simple return of the content passed as argument.
The problem won't be solved by removing all cached and compiled files. Those files are allways removed if the settings on the cache system or any other core settings are changed. I wrote a simple method on this:
[php:1:e8fd1001bd] /**
* ClearAll
*
* Löscht alle temporären Daten der Template Engine.
*
* @version 0.1
* @since 5.5.2
* @author Hinrich Donner <hd at phportals dot de>
* @see Smarty::clear_all_cache(), Smarty::clear_compiled_tpl()
*/
function ClearAll()
{
$this->clear_compiled_tpl();
$this->clear_all_cache();
}[/php:1:e8fd1001bd] |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Wed Apr 28, 2004 2:10 pm Post subject: |
|
|
hmm, do you have force_compile enabled?
maybe there is a bug in smarty, that does include_once() on the function-definitions. when the id in the function-name changes (maybe by force_compile) that could trigger something you describe. |
|
Back to top |
|
Hinrich Smarty Rookie
Joined: 18 Apr 2003 Posts: 33
|
Posted: Wed Apr 28, 2004 6:14 pm Post subject: |
|
|
messju wrote: | hmm, do you have force_compile enabled? |
No, but I do have compile_check enabled and set up a compile id (depends on the selected language, choosen skin and the current user id).
Quote: | maybe there is a bug in smarty, that does include_once() on the function-definitions. when the id in the function-name changes (maybe by force_compile) that could trigger something you describe. |
During my tests (switching on the cache from my interface) the compile id is not changed. But all files are deleted on the change. By doing this I delete the compiled templates first to make sure that a new cache file is not be written after deleting the cache but still having the compiled files (a .2 secounds period). |
|
Back to top |
|
Hinrich Smarty Rookie
Joined: 18 Apr 2003 Posts: 33
|
Posted: Tue May 04, 2004 6:39 pm Post subject: |
|
|
So, no idea? |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Tue May 04, 2004 9:02 pm Post subject: |
|
|
sorry, no idea.
i'd need a simple example that triggers the error above. |
|
Back to top |
|
dthought Smarty Regular
Joined: 21 Apr 2003 Posts: 55 Location: Melbourne, Australia
|
Posted: Fri May 14, 2004 4:46 am Post subject: Re: Cache Problem |
|
|
Hinrich wrote: |
Smarty-Version: Current CVS
|
Try using the production instead of CVS version, see if it helps... |
|
Back to top |
|
|