View previous topic :: View next topic |
Author |
Message |
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Wed Oct 23, 2013 6:46 pm Post subject: |
|
|
adn
I did send you already a couple of days ago a "private message" about sending me a set of failing templates for testing. |
|
Back to top |
|
adn Smarty Regular
Joined: 31 May 2011 Posts: 91
|
|
Back to top |
|
adn Smarty Regular
Joined: 31 May 2011 Posts: 91
|
Posted: Wed Oct 23, 2013 6:48 pm Post subject: |
|
|
Sorry U.Tews, I didn't see... I will see _________________ http://www.letsGarden.info |
|
Back to top |
|
adn Smarty Regular
Joined: 31 May 2011 Posts: 91
|
Posted: Wed Nov 06, 2013 6:13 pm Post subject: |
|
|
Hello,
I have duplicated part of my website and I found a first difference in compiler which lead into an error in 3.1.15 and not in 3.1.14 but not sure this is my problem
Code: | {include file='xxxx.inc.tpl' cache_lifetime=3600} |
I get this error
Quote: | Uncaught --> Smarty Compiler: Syntax error in template .... invalid caching mode of subtemplate within {block} tags <-- thrown in ... |
When I remove the parameter cache_lifetime it is ok _________________ http://www.letsGarden.info |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Thu Nov 07, 2013 1:02 am Post subject: |
|
|
An {include} with a cache_lifetime within {block} tags could create wrong results in certain situations.
For that reason 3.1.15 is more restrictive and created an error.
Do you really need a specific lifetime for the include? |
|
Back to top |
|
adn Smarty Regular
Joined: 31 May 2011 Posts: 91
|
Posted: Thu Nov 07, 2013 9:19 am Post subject: |
|
|
Yes I need this lifetime
Some parts of my website are refreshed thanks to the lifetime include capability. Those parts are dedicated to hot news, others parts are cold and doesn't need to be refreshed
To show you
http://www.aujardin.info/
The right column is a block in which "ACTUALITÉ & EVÉNEMENTS" is an include using the lifetime option to be refreshed every 3600s _________________ http://www.letsGarden.info |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Thu Nov 07, 2013 7:12 pm Post subject: |
|
|
The too restrictive error handling is removed now in the SVN trunk version.
The fix will later be included in 3.1.16 |
|
Back to top |
|
adn Smarty Regular
Joined: 31 May 2011 Posts: 91
|
Posted: Fri Nov 08, 2013 5:14 pm Post subject: |
|
|
Hi,
I tried your modification but the problem wasn't fixed. I removed another error and it works !!
Hereafter the final code I use
Code: | // variable compile_id?
if (isset($_attr['compile_id'])) {
if (!((substr_count($_attr['compile_id'], '"') == 2 || substr_count($_attr['compile_id'], "'") == 2))
|| substr_count($_attr['compile_id'], '(') != 0 || substr_count($_attr['compile_id'], '$_smarty_tpl->') != 0
) {
$merge_compiled_includes = false;
if ($compiler->inheritance) {
$compiler->trigger_template_error(' variable compile_id not allow within {block} tags');
}
}
}
if ($compiler->template->caching && ($compiler->tag_nocache || $compiler->nocache) && $_caching != self::CACHING_NOCACHE_CODE) {
$merge_compiled_includes = false;
/*if ($compiler->inheritance) {
$compiler->trigger_template_error(' invalid caching mode of subtemplate within {block} tags');
}*/
} |
This code is in prod, is that ok? Was this code modified in this release? _________________ http://www.letsGarden.info |
|
Back to top |
|
adn Smarty Regular
Joined: 31 May 2011 Posts: 91
|
Posted: Fri Nov 08, 2013 5:43 pm Post subject: |
|
|
It is not the only problem
I had another one which is not identified but by copying smarty_internal_compile_include.php from the version 3.1.14 in the version 3.1.15 everything is ok ... for now, I am still doing tests _________________ http://www.letsGarden.info |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Sat Nov 09, 2013 12:02 am Post subject: |
|
|
I don't think you tried the trunk version because it has both error messages removed like
Code: | if ($compiler->has_variable_string || !((substr_count($include_file, '"') == 2 || substr_count($include_file, "'") == 2))
|| substr_count($include_file, '(') != 0 || substr_count($include_file, '$_smarty_tpl->') != 0
) {
$merge_compiled_includes = false;
}
// variable compile_id?
if (isset($_attr['compile_id'])) {
if (!((substr_count($_attr['compile_id'], '"') == 2 || substr_count($_attr['compile_id'], "'") == 2))
|| substr_count($_attr['compile_id'], '(') != 0 || substr_count($_attr['compile_id'], '$_smarty_tpl->') != 0
) {
$merge_compiled_includes = false;
}
}
|
|
|
Back to top |
|
adn Smarty Regular
Joined: 31 May 2011 Posts: 91
|
Posted: Sat Nov 09, 2013 9:59 am Post subject: |
|
|
Exact! I copied only the modification I thought you did but it was wrong but it seems I forget something.
With a complete copy of the trunk version my errors are now ok.
Thanks for your support and this great tool!!! _________________ http://www.letsGarden.info |
|
Back to top |
|
adn Smarty Regular
Joined: 31 May 2011 Posts: 91
|
Posted: Thu Dec 19, 2013 4:37 pm Post subject: |
|
|
Hi U.Tews,
I just tested the 3.1.16 and I'm back with the problem. Its seems that the problem is not fixed in this version or there is a new one.
Any idea ? _________________ http://www.letsGarden.info |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Thu Dec 19, 2013 10:57 pm Post subject: |
|
|
By mistake the ZIP file did not contain the 3.1.16_RELEASE_NOTES file which does explain how these special cases.
The download files have now been updated. Please reload and follow the instructions of 3.1.16_RELEASE_NOTES |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
|
Back to top |
|
adn Smarty Regular
Joined: 31 May 2011 Posts: 91
|
|
Back to top |
|
|