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

upgrade from 3.0.8 to 3.1.8

 
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
tanila
Smarty n00b


Joined: 03 Mar 2012
Posts: 4

PostPosted: Sat Mar 03, 2012 10:26 am    Post subject: upgrade from 3.0.8 to 3.1.8 Reply with quote

Hello,

I am using Smarty for 4-5 jears now in my cusom CMS. I upgrades form Smarty 3.0.8 to 3.1.8 now ma Problem:

I stored a smarty-instance in an Object which is stored in the session. On a new created session there is no Problem. The page is displayed. But if a session is established I get the following exception:

Uncaught exception 'SmartyException' with message 'Invalid compiled template for: 'PATHTOTEMPLATE/TEMPLATE.tpl'

The smarty testfunction showed no Problems. All Paths are set correctly. I did not enable smarty-caching.

Are there some changes made in 3.1.8 relational to sessions in Smarty?
Can someone point me to a direction?
Back to top
View user's profile Send private message
U.Tews
Administrator


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

PostPosted: Sat Mar 03, 2012 11:51 am    Post subject: Reply with quote

Did you delete all old existing compiled template files after upgrading?

Because of internal changes the compiled files are not combatible.
Back to top
View user's profile Send private message
tanila
Smarty n00b


Joined: 03 Mar 2012
Posts: 4

PostPosted: Sat Mar 03, 2012 12:09 pm    Post subject: Reply with quote

Hi U.Tews,

shure I deleted the smarty-compile-dir
Smarty created a new compiled template, so that worked.

On the current testing-site I am using just one template, so there was only one file to delete.

I think this is a session problem, because of the strange behaviour described in my 1st post (new session -> it worked and with existing session -> the Error).
Back to top
View user's profile Send private message
U.Tews
Administrator


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

PostPosted: Sat Mar 03, 2012 2:32 pm    Post subject: Reply with quote

Storing the Smarty instance in a session can't really work as for example Smarty 3 does cache internal data in static varibales which get lost.

It seem to be just luck that it did work in your case with 3.0
Back to top
View user's profile Send private message
tanila
Smarty n00b


Joined: 03 Mar 2012
Posts: 4

PostPosted: Sat Mar 03, 2012 3:14 pm    Post subject: Reply with quote

Oh no...

Is there a way to disable smarty's internal caching?
Back to top
View user's profile Send private message
U.Tews
Administrator


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

PostPosted: Sat Mar 03, 2012 3:43 pm    Post subject: Reply with quote

No way. Smarty was never writen to support this.
Back to top
View user's profile Send private message
tanila
Smarty n00b


Joined: 03 Mar 2012
Posts: 4

PostPosted: Sat Mar 03, 2012 4:14 pm    Post subject: Reply with quote

ok thank you
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