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

problem with config load and compilation

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


Joined: 08 Jan 2008
Posts: 56

PostPosted: Mon Feb 22, 2010 9:29 am    Post subject: problem with config load and compilation Reply with quote

Hello, I encounter a problem with config_load.
I load a file test.conf, it contains:
Code:

#Sidebar
sidebar_home = accueil
#topbar menu
product = produits
amenagement_bureau = aménagement de bureau
services = services
catalog = catalogue

I load a file the following language:
{config_load file="local`$smarty.get.mylang`.conf"}
At times,
it fails to compile and run without stopping forcing to restart the server.
How to solve this problem?
Back to top
View user's profile Send private message
U.Tews
Administrator


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

PostPosted: Mon Feb 22, 2010 8:18 pm    Post subject: Reply with quote

What exactly do you mean by "fails to compile and run without stopping"?

Do you get an error message?
Does wrong output gets displayed?

Note: if you use caching Smarty can't automatically detect if a variable config filename has changed. In this case use should use a compile_id to get config file versions separated.

For your case like:
Code:
$smarty->compile_id = $_GET['mylang'];
Back to top
View user's profile Send private message
gtraxx
Smarty Regular


Joined: 08 Jan 2008
Posts: 56

PostPosted: Mon Feb 22, 2010 10:21 pm    Post subject: Reply with quote

I do not use the caching smarty for now.
I'm having a problem with my multi-language system that uses a. Config_load conf.
The browser runs constantly and can not display the page and the compilation does not do.
I edit the files. Conf and remove ######.
Is this a bug or error on my part?
I do not use caching for I expect the documentation on new features like "createTemplate"
But thank you for the idea of $ smarty-> compile_id = $ _GET [ 'mylang'];
I did not think: D
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 -> Smarty 3 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