|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
ilyalyu Smarty Regular
Joined: 03 Nov 2009 Posts: 72
|
Posted: Thu Oct 17, 2013 8:46 pm Post subject: Error after upgrading to the latest SVN vesion |
|
|
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 |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Thu Oct 17, 2013 9:05 pm Post subject: |
|
|
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 |
|
|
|
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
|