|
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 |
sm@rty Smarty Regular
Joined: 01 Oct 2014 Posts: 65
|
Posted: Sun Mar 22, 2015 6:56 pm Post subject: new bug in smarty(function, resource extension, nocache tag) |
|
|
hi
i can hardly find this bug.(my project has very page template)
in related with
http://www.smarty.net/forums/viewtopic.php?t=25425&postdays=0&postorder=asc&start=15&sid=1c97dd344ddd38c84f9efdc4f96d111e
Smarty version : new smarty version in githup(today)
please test this example :
%main%
Code: | {nocache}
{require 'test1'}
{/nocache} |
test1
Code: | {nocache}
{$a = 'test2'}
{function name=main}
{"function main loaded.<br>" nocache}
{require $a}
{call name='internal' nocache}
{/function}
{call 'main' nocache}
{/nocache}
|
test2
Code: | {function name=internal}
{"function internal loaded." nocache}
{"no problem here. please refresh again ..." nocache}
{/function} |
before run this example, clear all cache and compile file.
in first run :
Code: | function main loaded.
function internal loaded. no problem here. please refresh again ... |
in second run :
Fatal error: Uncaught --> Smarty: Unable to find template function 'internal' <-- thrown in ...\smarty\sysplugins\smarty_internal_template.php on line 575
and I've tested this project with update timestamp but display above error. |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Sun Mar 22, 2015 11:51 pm Post subject: |
|
|
Another extreme usage mix of template function definitions and calls
in nocache sections, cached and not cached subtemplates.
It's fixed on Github.
btw:
{require 'test'} with a nocache section when 'test1' is completely nocache does not make sense. It adds just bad performance. |
|
Back to top |
|
sm@rty Smarty Regular
Joined: 01 Oct 2014 Posts: 65
|
Posted: Mon Mar 23, 2015 7:57 am Post subject: |
|
|
Quote: | It's fixed on Github. |
thanks.
Quote: | {require 'test'} with a nocache section when 'test1' is completely nocache does not make sense. It adds just bad performance. |
ok.
but this is only a example. |
|
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
|