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

spaces

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


Joined: 28 Mar 2004
Posts: 11

PostPosted: Fri Jul 08, 2011 10:16 am    Post subject: spaces Reply with quote

Today I've made the upgrade from version 2.6 to 3.0.7.
I've seen a lot of changes but my entire site stop running. No messages of errors and the header, menu and footer was working, so I had no Idea what was wrong.

All my templates have this line and did not show anything:
Code:
<tr {if $row.Active == "0" }class="rowDeleted"{else}
bla bla bla
/if}>


The Fix:
Code:
<tr {if $row.Active == "0"}class="rowDeleted"{else}
bla bla bla
/if}>


Big diference? only a white space between "0" and }.
Is this a bug?

Apart from this little issue Smarty 3 rocks! Thanks a lot!
Back to top
View user's profile Send private message
rodneyrehm
Administrator


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

PostPosted: Fri Jul 08, 2011 10:46 am    Post subject: Reply with quote

smarty3 treats delimiters surrounded by whitespace as if they were surrounded by {literal}. This should simplify working with inline CSS and JS a lot. so no, this is not a bug.
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: Fri Jul 08, 2011 10:49 am    Post subject: Reply with quote

This problem is related to the new auto litereal option. See section
-Delimiters and whitespace- in the SMARTY2_BC_NOTES.

I mixure like {tag } no whitepace at opening tag but whitespace at closing tag was invalid up to version 3.0.7.

Since 3.0.8 {tag } is valid tag syntax.
Back to top
View user's profile Send private message
Margodth
Smarty Rookie


Joined: 28 Mar 2004
Posts: 11

PostPosted: Fri Jul 08, 2011 11:32 am    Post subject: Reply with quote

Smarty 3.0.8 solved the problem without touching a single line of code.

Thanks for the answers.
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