|
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 |
demo055 Smarty Rookie
Joined: 08 Apr 2013 Posts: 12
|
Posted: Mon Apr 29, 2013 2:25 pm Post subject: |
|
|
i agree it's very strange. I am using smarty 3.1.13. But same behaviour was also in older version of smarty. |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Mon Apr 29, 2013 6:11 pm Post subject: |
|
|
Do you perhaps extend the template class by setting $smarty->template_class and overload Smarty's isCache() method?
Otherwise I have currently no more idea's what went wrong in your system. |
|
Back to top |
|
demo055 Smarty Rookie
Joined: 08 Apr 2013 Posts: 12
|
Posted: Fri May 10, 2013 8:28 am Post subject: |
|
|
nope... just hypotetically is there some way isCached can return empty result? I swear i do not alternate your code... |
|
Back to top |
|
demo055 Smarty Rookie
Joined: 08 Apr 2013 Posts: 12
|
Posted: Fri May 10, 2013 8:43 am Post subject: |
|
|
ok i used ReflectionMethod to find out source code of isCached method... maybe helps...
Code: | public function isCached($template = null, $cache_id = null, $compile_id = null, $parent = null) { if ($template === null && $this instanceof $this->template_class) { return $this->cached->valid; } if (!($template instanceof $this->template_class)) { if ($parent === null) { $parent = $this; } $template = $this->smarty->createTemplate($template, $cache_id, $compile_id, $parent, false); } // return cache status of template return $template->cached->valid; } |
|
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Fri May 10, 2013 9:12 am Post subject: |
|
|
Set your error_reporting level and that in smarty->error_reporting to E_ALL and see if you get notices...
Do you use the standard smarty_internal_cacheresource_file or some thing different? Have you a chance to use the debugger and see what object is loaded at $this->cached and there is a property ->valid? |
|
Back to top |
|
demo055 Smarty Rookie
Joined: 08 Apr 2013 Posts: 12
|
Posted: Sat May 11, 2013 7:44 pm Post subject: |
|
|
ok... this is very strange... i don't know what i did, but magically it's working... maybe deleting all the files in templates_c directory... maybe something else... |
|
Back to top |
|
demo055 Smarty Rookie
Joined: 08 Apr 2013 Posts: 12
|
Posted: Sat May 11, 2013 7:55 pm Post subject: |
|
|
the problem is, that i deleted templates_c before, but memcache was activated... when i turn it off and deleted that directory it started to work... but question is why memcache is not working... i must not specify the cache directory? |
|
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
|