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

Turning on Caching stops config load working

 
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 -> Bugs
View previous topic :: View next topic  
Author Message
Budda
Smarty Regular


Joined: 19 Apr 2003
Posts: 53
Location: Lymm, Cheshire. UK

PostPosted: Wed Aug 13, 2003 12:58 pm    Post subject: Turning on Caching stops config load working Reply with quote

WHen i enable $smarty->caching = true it seems to cause the templates to fail when loading config files.

The template has lines such as:
Code:
{config_load file="front.index.lang" scope="local"}

which is now causing the error
Quote:
Warning: Smarty error: unable to read resource: "front.index.lang" in c:\php4\pear\Smarty\Smarty.class.php on line 1156


I've just upgraded to Smarty 2.6RC1 but haven't enabled caching before on the templates so not sure if it has been a long standing problem.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
Budda
Smarty Regular


Joined: 19 Apr 2003
Posts: 53
Location: Lymm, Cheshire. UK

PostPosted: Wed Aug 13, 2003 1:24 pm    Post subject: Reply with quote

Have also noticed that pages which do a simple load config work once, then upon refresh all the config variables are empty and so the page displays blank where the constants should be.

Definetly a bug in 2.6RC1 as i rolled back to Smarty 2.5 and all is fine again. Confused
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Wed Aug 13, 2003 1:57 pm    Post subject: Reply with quote

i cannot reproduce this. config-files and caching works fine with me. when the page is cached there is no need to load any config-files: the config-variables are already printed in the cached page.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Wed Aug 13, 2003 3:43 pm    Post subject: Reply with quote

Looks like you are on Windows, Budda. I have a similar issue on my w2k box which also eludes me.
Back to top
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Thu Aug 14, 2003 12:34 am    Post subject: Reply with quote

i see. i also know the offensive line in the source but i really don't know why this only occurs on windows.

i know two workarounds that worked for me to prevent this warning:
- turn $smarty->compile_check=false;
or
- add $smarty->config_dir to your include_path (funky, not?)

unfortunately i don't know how to solve this issue, yet.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Budda
Smarty Regular


Joined: 19 Apr 2003
Posts: 53
Location: Lymm, Cheshire. UK

PostPosted: Thu Aug 14, 2003 11:20 am    Post subject: Reply with quote

boots wrote:
Looks like you are on Windows, Budda. I have a similar issue on my w2k box which also eludes me.

Oops, yeah sorry i forgot to report that I was running the development server on Windows XP. Confused
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Thu Aug 14, 2003 4:46 pm    Post subject: Reply with quote

i committed a fix. check the cvs-version, it should solve your problem.

greetings
messju
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Budda
Smarty Regular


Joined: 19 Apr 2003
Posts: 53
Location: Lymm, Cheshire. UK

PostPosted: Fri Aug 15, 2003 8:23 am    Post subject: Reply with quote

The firewall at work blocks me from connecting to CVS so I can't get the files from there. What's the individual file(s) I could d/l from the CVS web front end?
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Fri Aug 15, 2003 8:45 am    Post subject: Reply with quote

@budda: AFAIR it was Smarty.class.php and core/core.read_cache_file.php

greetings
messju
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Budda
Smarty Regular


Joined: 19 Apr 2003
Posts: 53
Location: Lymm, Cheshire. UK

PostPosted: Fri Aug 15, 2003 8:54 am    Post subject: Reply with quote

Cheers messju, seems pretty good - so far - on Windows.
Might even risk it on a production website Wink
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Sat Aug 16, 2003 12:01 am    Post subject: Reply with quote

Quote:
Might even risk it on a production website


@budda: just say no! I'm finding that it is working fairly well with my codebase as well, but it is only the first release candidate. It is tempting, though, because I want to start using some of the new features Smile
Back to top
View user's profile Send private message
talo
Smarty Rookie


Joined: 18 Oct 2005
Posts: 16

PostPosted: Thu Nov 02, 2006 9:56 am    Post subject: same sort've error Reply with quote

Hi guys,

im getting the following:

"Warning: Smarty error: unable to read template resource: "front/my_diary.tpl" in /usr/local/www/muscletech/includes/Smarty/Smarty.class.php on line 1042"

and it seems that you are talking the same kind of problem.

what settings to i need to change to fix this.

im accessing the site from a windows machine but the actual site is located on a FREEBSD machine.

any ideas would be greatly appreciated.

ciao,
T.
Back to top
View user's profile Send private message
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Thu Nov 02, 2006 4:56 pm    Post subject: Reply with quote

@talo: no, this is not the same sort of problem and you are bumping a 3-year-old thread. Please repost your issue in the installation forum. You evidently have a problem with your setup and/or permission settings. Did you follow the manual's install instructions?
Back to top
View user's profile Send private message
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 -> Bugs All times are GMT
Page 1 of 1

 
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