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

Smarty3 filename issue

 
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
gencer
Smarty Rookie


Joined: 03 Dec 2011
Posts: 5

PostPosted: Mon Jan 30, 2012 12:50 pm    Post subject: Smarty3 filename issue Reply with quote

Hi,

In Smarty 3 (and maybe this happens in v2 too) if i give same filename to different files in different folders, caches are mixed!

For example. Lets say we have 2 views. This to wives are folder1 and folder2. Both folders have index.tpl. So, it just crashes.

How do i prevent it? For quick resolve i just renamed files as index1 and index2...

Thanks,
Gencer.
Back to top
View user's profile Send private message
rodneyrehm
Administrator


Joined: 30 Mar 2007
Posts: 674
Location: Germany, border to Switzerland

PostPosted: Mon Jan 30, 2012 2:02 pm    Post subject: Reply with quote

What's the value of your $template_dir for the files to crash?
_________________
Twitter
Back to top
View user's profile Send private message Visit poster's website
gencer
Smarty Rookie


Joined: 03 Dec 2011
Posts: 5

PostPosted: Mon Jan 30, 2012 2:41 pm    Post subject: Reply with quote

rodneyrehm wrote:
What's the value of your $template_dir for the files to crash?


It depends on which page is called. If index.php called $template_dir is "./folder1", if login.php called its "./folder2". I'm using modular application model for my project. Each application has its own folder and view. But they are using the same cache folder. "./cache/tpl"

Also, if im c orrect a while ago i tested something that, i include a file in tpl files which is in another folder but same filename. (like /view1/index.tpl includes /view2/index.tpl). Smarty caches are mixed...

I will test right now and let you know.


UPDATE:
Ok. I slightly upgraded to Smarty v3.1.7 and it seems that this issue resolved. Sorry for the false alarm.

Gencer.
Back to top
View user's profile Send private message
mohrt
Administrator


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

PostPosted: Mon Jan 30, 2012 3:27 pm    Post subject: Reply with quote

otherwise you would need to set a unique compile_id for each template folder for older versions.
Back to top
View user's profile Send private message Visit poster's website
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
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