Smarty 3.1.7 - problem with inline templates?

94 views
Skip to first unread message

MH

unread,
Feb 2, 2012, 10:43:10 PM2/2/12
to Smarty Developers

I noticed there was mention of this in the release thread, but no
resolution that I could see, and someone asked to split these into a
separate thread, so...

I have a family of templates, and normally they have block like this:

{block name="geoblock"}{include file="utils/geoblock.tpl"}{/block}

which produces this in the resultant file:

<?php /* Call merged included template "utils/geoblock.tpl" */
$_tpl_stack[] = $_smarty_tpl;
$_smarty_tpl = $_smarty_tpl->setupInlineSubTemplate("utils/
geoblock.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null,
null, array(), 0, '12915391414f2b525dd27725-46739266');
content_4f2b525e6bc1a($_smarty_tpl);
$_smarty_tpl = array_pop($_tpl_stack); /* End of included template
"utils/geoblock.tpl" */?>

In Smarty 3.1.6, that function is defined later in the compiled
template and it works fine. However, in Smarty 3.1.7, the
corresponding function is never defined, and an error occurs.
Clearing the smarty cache does not help.

uwe.tews

unread,
Feb 3, 2012, 11:09:39 AM2/3/12
to Smarty Developers
I was not able to reproduce the problem.

Is {block name="geoblock"}{include file="utils/geoblock.tpl"}{/block}
in a parent or schild template?

Could you PM me a set of templates for investigation?

Regards Uwe

uwe.tews

unread,
Feb 19, 2012, 10:56:58 AM2/19/12
to Smarty Developers
Thanks for the provided template set.

The problem did occur when using {include} in nested {block} tags in
child templates combined with append/prepend attributes.

The fix is now in the SVN trunk and will later be included in 3.1.8

Greg Milby

unread,
Feb 24, 2012, 5:25:08 AM2/24/12
to smarty-d...@googlegroups.com

IM getting the same error @work now and do not use includes. There are loops with key, literal, and blocks.  is that a toxic combo now?   (cache tmp cleared before upgrade per bug fix 83)
Ty

--
You received this message because you are subscribed to the Google Groups "Smarty Developers" group.
To post to this group, send email to smarty-d...@googlegroups.com.
To unsubscribe from this group, send email to smarty-develop...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/smarty-developers?hl=en.

uwe.tews

unread,
Feb 25, 2012, 5:08:06 AM2/25/12
to Smarty Developers
Greg according the your entry in the forum you got a different error.
See my answer there. http://www.smarty.net/forums/viewtopic.php?t=20541

On Feb 24, 11:25 am, Greg Milby <gmi...@gmail.com> wrote:
> IM getting the same error @work now and do not use includes. There are
> loops with key, literal, and blocks.  is that a toxic combo now?   (cache
> tmp cleared before upgrade per bug fix 83)
> Ty

Greg Milby

unread,
Feb 25, 2012, 6:44:46 AM2/25/12
to smarty-d...@googlegroups.com

Thank you for the reply

Reply all
Reply to author
Forward
0 new messages