Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

{nocache:3f35f2ebb0a74a323163b831594dfb76#0}
Goto page 1, 2  Next
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
mumuri
Smarty Rookie


Joined: 06 Apr 2008
Posts: 27

PostPosted: Thu Sep 04, 2008 10:01 am    Post subject: {nocache:3f35f2ebb0a74a323163b831594dfb76#0} Reply with quote

hi

Sometimes, i ve got some textual nocache tags, which are displayed in the layout of my template

How can we avoid this ?


thanks
Back to top
View user's profile Send private message Visit poster's website
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Thu Sep 04, 2008 1:58 pm    Post subject: Reply with quote

are you using the latest version of smarty?
Back to top
View user's profile Send private message Visit poster's website
mumuri
Smarty Rookie


Joined: 06 Apr 2008
Posts: 27

PostPosted: Sat Sep 06, 2008 9:11 am    Post subject: Reply with quote

version is 2.6.19
Code:
/**
 * Project:     Smarty: the PHP compiling template engine
 * File:        Smarty.class.php
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 * For questions, help, comments, discussion, etc., please join the
 * Smarty mailing list. Send a blank e-mail to
 * smarty-general-subscribe lists.php.net
 *
 * @link http://smarty.php.net/
 * @copyright 2001-2005 New Digital Group, Inc.
 * @author Monte Ohrt <monte at ohrt dot com>
 * @author Andrei Zmievski <andrei php.net>
 * @package Smarty
 * @version 2.6.19
 */

i will upgrade to 2.6.20

more over it seems i m not the only one to have this problem
http://community.zikula.org/module-Forum-viewtopic-topic-55199-start-0.htm
Back to top
View user's profile Send private message Visit poster's website
mumuri
Smarty Rookie


Joined: 06 Apr 2008
Posts: 27

PostPosted: Sat Sep 06, 2008 9:55 am    Post subject: Reply with quote

i don't know if it's linked, but i ve got this on the 2.6.20
Code:

Fatal error: Call to undefined function _smarty_tplfunc_594878c0cb0dc9390fbe545b149d8e57_0() in /home/www/rezo/includes/classes/Smarty/Smarty.class.php on line 1828


i added a function_exists, to avoid the problem ...

Code:

  /**
     * callback function for preg_replace, to call a non-cacheable block
     * @return string
     */
    function _process_compiled_include_callback($match) {
        $_func = '_smarty_tplfunc_'.$match[2].'_'.$match[3];
        if (function_exists($_func)){
           ob_start();
           $_func($this);
           $_ret = ob_get_contents();
           ob_end_clean();
        }
        return $_ret;
    }
Back to top
View user's profile Send private message Visit poster's website
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Sat Sep 06, 2008 10:36 am    Post subject: Reply with quote

To start over with a clean environment after the upgrade you should once empty the template_c and cache folder.
Back to top
View user's profile Send private message
mumuri
Smarty Rookie


Joined: 06 Apr 2008
Posts: 27

PostPosted: Sun Sep 07, 2008 11:02 am    Post subject: Reply with quote

hello

i have one compiled folder, and "two" cache folder (i m using the same compiled files to generate two version of a cache file, the content is taken from a different database in the one case or the other)

do you think it can lead to these problems
Back to top
View user's profile Send private message Visit poster's website
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Sun Sep 07, 2008 2:01 pm    Post subject: Reply with quote

I think that this could not cause the problem.

But it looks like that the cached versions are getting out of sync with the compiled versions. Do you have $smarty->compile_check = true?
Back to top
View user's profile Send private message
mumuri
Smarty Rookie


Joined: 06 Apr 2008
Posts: 27

PostPosted: Sun Sep 07, 2008 2:08 pm    Post subject: Reply with quote

yes

at least , i checked it in the GUI, they gives to me in the CMS

"compile check" is activated, but it's to that i doesn't force recompilation for each page


note that i used a CMS (zikula) where they compiled / cached one template for a module, and that the content of the compiled file is wrapped into the overall design with smarty too.

can it be the cause of the problem
Back to top
View user's profile Send private message Visit poster's website
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Sun Sep 07, 2008 2:17 pm    Post subject: Reply with quote

Hmm, I don't know how your CMS is working. Are the templates stored in folders or loaded from a database? Which CMS do you use?
Back to top
View user's profile Send private message
mumuri
Smarty Rookie


Joined: 06 Apr 2008
Posts: 27

PostPosted: Sun Sep 07, 2008 2:23 pm    Post subject: Reply with quote

U.Tews wrote:
Hmm, I don't know how your CMS is working. Are the templates stored in folders or loaded from a database? Which CMS do you use?


the templates are stored in folders ( one folder for the theme template and one folder for the template of each module), and i upgraded the smarty version (2.6.19) with the last one with winmerge

i m using zikula (previous named postnuke)
http://zikula.org/CMS/Download/

the CMS has a pnRender class which extend Smarty, to render the module part

Code:
class pnRender extends Smarty {
...
}


the configuration is done by a gui on this link
/index.php?module=pnRender&type=admin


then the CMS has a pnTheme.class.php which extends pnRender to render the overall layout

Code:
if (class_exists('pnRender')) {
    class Theme extends pnRender {
...
}
}


the configuration is done by a gui on this link
index.php?module=Themes&type=admin

then cached file are stored

in
pnTemp/pnRender_cache
for the module part

in pnTemp/Xanthia_cache
for the theme part

and compiled file are stored in
pnTemp/Xanthia_compiled
for the theme part

and in
pnTemp/pnRender_compiled
for the module part
Back to top
View user's profile Send private message Visit poster's website
mumuri
Smarty Rookie


Joined: 06 Apr 2008
Posts: 27

PostPosted: Mon Sep 08, 2008 7:57 am    Post subject: Reply with quote

do you think this problem can comme from xcache, a PHP opcode cacher ?
http://xcache.lighttpd.net/
Back to top
View user's profile Send private message Visit poster's website
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Mon Sep 08, 2008 9:39 am    Post subject: Reply with quote

Could be....
Back to top
View user's profile Send private message
Mischosch
Smarty n00b


Joined: 11 Aug 2005
Posts: 4

PostPosted: Tue Sep 16, 2008 10:39 am    Post subject: Reply with quote

same problem here…
smarty is up to date.
disappeared after delete templates_c and cache.

Fatal error: Call to undefined function _smarty_tplfunc_6ecf3df5529dbebf64e541cff99155e7_0() in /srv/www/htdocs/inside/inside-handy.de/lib/smarty/Smarty.class.php on line 1828

seems to be the no_cache plugin.

(this function call seems really strange to me!)

Any ideas for further debugging?
Back to top
View user's profile Send private message AIM Address
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Tue Sep 16, 2008 3:32 pm    Post subject: Reply with quote

Looks like that the compile_dir and cache_dir is getting out of sync.

You should check the following:

1. $smarty->compile_check should be be true.

2. If you use templates with same name from different template_dir's sharing the same compile_dir and cache_dir you must use unique compile_id's.

3. Do you have a fix pair of compile_dir and cache_dir?

4. Does this problem pop up after you have modified a template?

5. Are you using a CMS?
Back to top
View user's profile Send private message
Mischosch
Smarty n00b


Joined: 11 Aug 2005
Posts: 4

PostPosted: Tue Sep 16, 2008 4:02 pm    Post subject: Reply with quote

1. was not activated, didn't know about it

2. no use of tpls with same name in different locations

3. compile and cache dir are always the same, with absolute path defined

4. Problem occurs without editing template. Template was not changed for days. Problem occured suddenly

5. A self made cms is used in the background
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
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
Protected by Anti-Spam ACP