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

Error Message with "compile_tag" function

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


Joined: 24 Apr 2003
Posts: 8
Location: Paris, FRANCE

PostPosted: Thu Apr 24, 2003 8:59 am    Post subject: Error Message with "compile_tag" function Reply with quote

Hi all,

I'm new on this forum
I'm just used Smarty on a production product and I like way to separate design and functional.
However, I seen some little mistakes like this one :

With a specific browser configuration (I don't know the parameter which leads to error), several windows error message can appears.

For example, "; attendu" (with french configuration)
It's due to the way used to parse template :
for example, when parsing "if" or "elseif", the code is (in smarty_compiler.class.php) :
if ($elseif)
return '...$tokens).'):?>';
else
...

I don't understand the use of the ":" caracter added after the token (corresponding to the condition)
The generated HTML is like this : <?php if(condition):?>
This ":" make a error message window appears.

The same behavior appears with {else}, {section}...
and I don't have the time to analyse all Smarty classes, so I think about all of you ;oD

Any explanation and/or solution for this problem ?
Thanks in advance.
Back to top
View user's profile Send private message
messju
Administrator


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

PostPosted: Thu Apr 24, 2003 9:19 am    Post subject: Reply with quote

the ":"-way is an alternative syntax for php-control-structures. see:
http://www.php.net/manual/en/control-structures.alternative-syntax.php

but i don't know, what makes your setup break i would need sample-code for that.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Sri_Lumpa
Smarty Rookie


Joined: 24 Apr 2003
Posts: 8
Location: Paris, FRANCE

PostPosted: Thu Apr 24, 2003 9:32 am    Post subject: Reply with quote

Thanks,

I didn't know the existance of "Alternative syntax for control structures".
So, the generated code is available.
I'm just wonder why the browser don't understand it (depends on its configuration).
I post a reply when/if I found the cause.

See u.
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