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

default modifier not working in rev. 3412

 
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
artvolk
Smarty Regular


Joined: 09 Dec 2009
Posts: 45

PostPosted: Sun Dec 27, 2009 7:58 pm    Post subject: default modifier not working in rev. 3412 Reply with quote

Good day!

I've updated to latest SVN version and got the following error message on second refresh of the page:

Fatal error: Call to undefined function smarty_modifier_default()

Thanks!
Back to top
View user's profile Send private message
artvolk
Smarty Regular


Joined: 09 Dec 2009
Posts: 45

PostPosted: Sun Dec 27, 2009 8:46 pm    Post subject: Reply with quote

It seems some changes in include function were performed too, I've got the following errors:

Warning: include(Array) [function.include]: failed to open stream: No such file or directory in
Back to top
View user's profile Send private message
U.Tews
Administrator


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

PostPosted: Sun Dec 27, 2009 9:45 pm    Post subject: Reply with quote

Can you give me some more information please?

Did you use caching?
Any special condition like nocahe section, nocache variable?

Could you provide the lines around the error from the cache file or compiled template, as well as the corresponding lines of your template source?

Which include function do you mean? please provide the full error message with line numbers and call stack if possible.
Back to top
View user's profile Send private message
U.Tews
Administrator


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

PostPosted: Sun Dec 27, 2009 10:28 pm    Post subject: Reply with quote

I found a bug on modifie plugin loading in certain nocache situtaions.

A fix for that is in the SVN now.
Back to top
View user's profile Send private message
artvolk
Smarty Regular


Joined: 09 Dec 2009
Posts: 45

PostPosted: Mon Dec 28, 2009 8:52 am    Post subject: Reply with quote

Thank you for the fix, but the latest version do not load plugins from no-system dirs.

I'm assigning array of directories like this:

$smarty->plugins_dir = array(
...
);

It works in revision 3406.
Back to top
View user's profile Send private message
U.Tews
Administrator


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

PostPosted: Mon Dec 28, 2009 3:43 pm    Post subject: Reply with quote

The SVN was broken today. Can you please check again?
Back to top
View user's profile Send private message
artvolk
Smarty Regular


Joined: 09 Dec 2009
Posts: 45

PostPosted: Mon Dec 28, 2009 8:28 pm    Post subject: Reply with quote

The bad news is that bug is still here, the good news is that I've created test case which reproduces the bug.

child.tpl:
Code:

{extends file='parent.tpl'}
{block name='content'}
{/block}


parent.tpl:
Code:

{extends file='grand_parent.tpl'}
{block name='top'}
   {$test|default:'testing'}   
{/block}
{block name='content'}
{/block}


grand_parent.tpl:
Code:

{block name='top'}
{/block}
{block name='content'}
{/block}


Error:
Code:

Fatal error: Call to undefined function smarty_modifier_default() in ........\templates_c\177387169.file.child.tpl.php on line 30
Back to top
View user's profile Send private message
U.Tews
Administrator


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

PostPosted: Mon Dec 28, 2009 8:47 pm    Post subject: Reply with quote

Thanks for bringing his up. A fix is in the SVN.
Back to top
View user's profile Send private message
artvolk
Smarty Regular


Joined: 09 Dec 2009
Posts: 45

PostPosted: Tue Dec 29, 2009 6:33 am    Post subject: Reply with quote

Thanks, it works!
Back to top
View user's profile Send private message
grmbl
Smarty Rookie


Joined: 12 Jan 2010
Posts: 7

PostPosted: Tue Jan 12, 2010 12:03 pm    Post subject: Reply with quote

It seems that this (or very similar) bug has popped back in recently.
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