Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
Error after upgrading to the latest SVN vesion

 
Post new topic   Reply to topic    Smarty Forum Index -> Bugs
View previous topic :: View next topic  
Author Message
ilyalyu
Smarty Regular


Joined: 03 Nov 2009
Posts: 72

PostPosted: Thu Oct 17, 2013 8:46 pm    Post subject: Error after upgrading to the latest SVN vesion Reply with quote

I am getting this exception:

Exception "Missing template name" in T:\HTDOCS\CMS\core\third-party\smarty\sysplugins\smarty_internal_template.php (648)
0: Smarty_Internal_Template->__get(string{6}) in T:\HTDOCS\CMS\core\third-party\smarty\sysplugins\smarty_internal_template.php (682)
1: Smarty_Internal_Template->__get(string{8}) in T:\HTDOCS\CMS\core\third-party\smarty\sysplugins\smarty_internal_compile_include.php (171)
2: Smarty_Internal_Compile_Include->compile(array{3}, object{Smarty_Internal_SmartyTemplateCompiler}, array{0}, null, null) in T:\HTDOCS\CMS\core\third-party\smarty\sysplugins\smarty_internal_templatecompilerbase.php (566)
3: Smarty_Internal_TemplateCompilerBase->callTagCompiler(string{7}, array{3}, array{0}) in T:\HTDOCS\CMS\core\third-party\smarty\sysplugins\smarty_internal_templatecompilerbase.php (337)
4: Smarty_Internal_TemplateCompilerBase->compileTag(string{7}, array{3}) in T:\HTDOCS\CMS\core\third-party\smarty\sysplugins\smarty_internal_templateparser.php (2383)
5: Smarty_Internal_Templateparser->yy_r37() in T:\HTDOCS\CMS\core\third-party\smarty\sysplugins\smarty_internal_templateparser.php (3093)
6: Smarty_Internal_Templateparser->yy_reduce(37) in T:\HTDOCS\CMS\core\third-party\smarty\sysplugins\smarty_internal_templateparser.php (3191)
7: Smarty_Internal_Templateparser->doParse(3, string{1}) in T:\HTDOCS\CMS\core\third-party\smarty\sysplugins\smarty_internal_smartytemplatecompiler.php (109)
8: Smarty_Internal_SmartyTemplateCompiler->doCompile(string{10036}) in T:\HTDOCS\CMS\core\third-party\smarty\sysplugins\smarty_internal_templatecompilerbase.php (273)
9: Smarty_Internal_TemplateCompilerBase->compileTemplate(object{Smarty_Internal_Template}) in T:\HTDOCS\CMS\core\third-party\smarty\sysplugins\smarty_internal_template.php (186)
10: Smarty_Internal_Template->compileTemplateSource() in T:\HTDOCS\CMS\core\third-party\smarty\sysplugins\smarty_internal_templatebase.php (149)
11: Smarty_Internal_TemplateBase->fetch(string{23}) in T:\HTDOCS\CMS\core\core-functions.php (112)


I think it is caused by this include:
{include "{'api/template.html'}"
Back to top
View user's profile Send private message
U.Tews
Administrator


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

PostPosted: Thu Oct 17, 2013 9:05 pm    Post subject: Reply with quote

Why are you using such ugly construct like

Code:
{include "{'api/template.html'}"}


The inner { } are interpreted as Smarty tag which must be echo and captured to include it in the double quoted string.
It end in a compiled code of
<?php ob_start();?><?php echo 'api/template.html';?>
<?php $_tmp1=ob_get_clean();?><?php echo $_smarty_tpl->getSubTemplate ($_tmp1, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

Why did you not use just
Code:
{include "api/template.html"}
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    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