Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

White page with new version
Goto page Previous  1, 2, 3  Next
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
U.Tews
Administrator


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

PostPosted: Wed Oct 23, 2013 6:46 pm    Post subject: Reply with quote

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
View user's profile Send private message
adn
Smarty Regular


Joined: 31 May 2011
Posts: 91

PostPosted: Wed Oct 23, 2013 6:47 pm    Post subject: Reply with quote

Nothing appears in the apache log Sad
_________________
http://www.letsGarden.info
Back to top
View user's profile Send private message Visit poster's website
adn
Smarty Regular


Joined: 31 May 2011
Posts: 91

PostPosted: Wed Oct 23, 2013 6:48 pm    Post subject: Reply with quote

Sorry U.Tews, I didn't see... I will see
_________________
http://www.letsGarden.info
Back to top
View user's profile Send private message Visit poster's website
adn
Smarty Regular


Joined: 31 May 2011
Posts: 91

PostPosted: Wed Nov 06, 2013 6:13 pm    Post subject: Reply with quote

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 Shocked
_________________
http://www.letsGarden.info
Back to top
View user's profile Send private message Visit poster's website
U.Tews
Administrator


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

PostPosted: Thu Nov 07, 2013 1:02 am    Post subject: Reply with quote

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
View user's profile Send private message
adn
Smarty Regular


Joined: 31 May 2011
Posts: 91

PostPosted: Thu Nov 07, 2013 9:19 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
U.Tews
Administrator


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

PostPosted: Thu Nov 07, 2013 7:12 pm    Post subject: Reply with quote

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
View user's profile Send private message
adn
Smarty Regular


Joined: 31 May 2011
Posts: 91

PostPosted: Fri Nov 08, 2013 5:14 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
adn
Smarty Regular


Joined: 31 May 2011
Posts: 91

PostPosted: Fri Nov 08, 2013 5:43 pm    Post subject: Reply with quote

It is not the only problem Sad

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
View user's profile Send private message Visit poster's website
U.Tews
Administrator


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

PostPosted: Sat Nov 09, 2013 12:02 am    Post subject: Reply with quote

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
View user's profile Send private message
adn
Smarty Regular


Joined: 31 May 2011
Posts: 91

PostPosted: Sat Nov 09, 2013 9:59 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
adn
Smarty Regular


Joined: 31 May 2011
Posts: 91

PostPosted: Thu Dec 19, 2013 4:37 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
U.Tews
Administrator


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

PostPosted: Thu Dec 19, 2013 10:57 pm    Post subject: Reply with quote

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
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Thu Dec 19, 2013 11:11 pm    Post subject: Reply with quote

Or read it from the repo.

http://smarty-php.googlecode.com/svn/trunk/distribution/3.1.16_RELEASE_NOTES.txt
Back to top
View user's profile Send private message Visit poster's website
adn
Smarty Regular


Joined: 31 May 2011
Posts: 91

PostPosted: Fri Dec 20, 2013 4:38 pm    Post subject: Reply with quote

Thank you
It's now ok !

The link has changed
http://smarty-php.googlecode.com/svn/trunk/distribution/INHERITANCE_RELEASE_NOTES.txt
_________________
http://www.letsGarden.info
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
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