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

3.1 RC to 3.1 break my website
Goto page Previous  1, 2, 3
 
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 -> Installation and Setup
View previous topic :: View next topic  
Author Message
adn
Smarty Regular


Joined: 31 May 2011
Posts: 91

PostPosted: Sun Sep 25, 2011 4:21 pm    Post subject: Reply with quote

Thanks Globe !!
In fact, I forgot to delete one of my compiled template. Confused

I continue my tests...
Back to top
View user's profile Send private message Visit poster's website
Aristophan
Smarty Regular


Joined: 10 Jan 2011
Posts: 96

PostPosted: Mon Sep 26, 2011 8:54 am    Post subject: Reply with quote

Just had this with 3.1.1 too, which confused me.

I think it is all set well internally, as print_r($smarty']->getPluginsDir()); does show the correct path and 'Testing plugin files' is OK.
But testInstall() does not return the path value in 'Testing plugins directory'. If you set an uncorrect path in setPluginsDir() it does return the value.
There should be a path return value if OK.
Code:
Testing plugins directory...
Testing cache directory...
.\cache\ is OK.
Testing configs directory...
/path/to/templates/default\ is OK.
Testing sysplugin files...
... OK
Testing plugin files...
... OK

This might be better in function testInstall
Code:
            } else {
                if ($_core_plugins_dir && $_core_plugins_dir == realpath($plugin_dir)) {
                    $_core_plugins_available = true;
                }
                if ($errors === null) {
                    echo "$plugin_dir is OK.\n";
                }
            }
Back to top
View user's profile Send private message
Aristophan
Smarty Regular


Joined: 10 Jan 2011
Posts: 96

PostPosted: Tue Sep 27, 2011 7:46 am    Post subject: Reply with quote

Is the above solution returning the plugins dir in testInstall() for nuts?
I just added
Code:
                echo realpath($_cache_dir) . DS . " is OK.\n";
                #echo "{$_cache_dir} is OK.\n";
to get back a real path for the ./cache/ dir, like all the others have too.
Back to top
View user's profile Send private message
Aristophan
Smarty Regular


Joined: 10 Jan 2011
Posts: 96

PostPosted: Thu Sep 29, 2011 4:47 pm    Post subject: tweaking testInstall() Reply with quote

I am sorry to ask again - its the last time, I promise Wink -

aren't these 2 tweaks to function testInstall() still necessary?
I think it is a main function for beginners, which should hold real information.
Back to top
View user's profile Send private message
chrisnoden
Smarty Rookie


Joined: 17 Sep 2011
Posts: 6

PostPosted: Wed Oct 05, 2011 10:31 pm    Post subject: Is it back? Reply with quote

Has the loadPlugin() case problem been re-introduced? The symptoms have returned.
Back to top
View user's profile Send private message
rodneyrehm
Administrator


Joined: 30 Mar 2007
Posts: 674
Location: Germany, border to Switzerland

PostPosted: Fri Oct 07, 2011 10:44 am    Post subject: Reply with quote

Aristophan wrote:
Is the above solution returning the plugins dir in testInstall() for nuts?
I just added
Code:
                echo realpath($_cache_dir) . DS . " is OK.\n";
                #echo "{$_cache_dir} is OK.\n";
to get back a real path for the ./cache/ dir, like all the others have too.


testInstall() never shows the resolved path, but the path you configured. In fact, the tests for plugins_dir, template_dir and config_dir don't include the possibility of $use_include_path = true. So tests are not complete.

I guess we could easily output something like <span title="{$resolvedPath}">{$configuredPath}</span> so you can access the absolute paths of your configuration.
_________________
Twitter
Back to top
View user's profile Send private message Visit poster's website
rodneyrehm
Administrator


Joined: 30 Mar 2007
Posts: 674
Location: Germany, border to Switzerland

PostPosted: Fri Oct 07, 2011 11:08 am    Post subject: Reply with quote

SVN trunk now features testInstall() resolving all paths to absolute and resolving include_path where configured. (will be included in Smarty 3.1.3)
_________________
Twitter
Back to top
View user's profile Send private message Visit poster's website
Aristophan
Smarty Regular


Joined: 10 Jan 2011
Posts: 96

PostPosted: Fri Oct 07, 2011 1:38 pm    Post subject: Reply with quote

Whow, thank you globe!!
That really looks like an improvement! Merci!
I'll test that ASAP.

Edit:
Thats how I expected it to be. Much better.
Back to top
View user's profile Send private message
chrisnoden
Smarty Rookie


Joined: 17 Sep 2011
Posts: 6

PostPosted: Fri Oct 07, 2011 4:12 pm    Post subject: Fresh checkout, old problem (it seems) Reply with quote

testInstall() says all is OK

A fresh checkout of rev 4371, removing and re-creating the templates dirs results in this error:

filemtime() [<a href='function.filemtime'>function.filemtime</a>]: stat failed for /{removed}/templates_c/5507d56dcd1ad1c320fac46303c1ee777e0e2e84.file.index.html.php on line 613 in /opt/local/www/sal/platform/externals/Smarty/sysplugins/smarty_resource.php

Same error we saw way back which was traced to strtolower and case sensitivity on filesystems. Is this the same error re-surfaced?

I am developing on OS X and installing on CentOS. Error is there on both. Rolling back to rev 4227 fixes it all.
Back to top
View user's profile Send private message
rodneyrehm
Administrator


Joined: 30 Mar 2007
Posts: 674
Location: Germany, border to Switzerland

PostPosted: Fri Oct 07, 2011 4:15 pm    Post subject: Reply with quote

Please read through http://www.smarty.net/forums/viewtopic.php?t=20054 to see why we are doing what we're doing. http://www.smarty.net/docs/en/api.mute.expected.errors.tpl is what will help you avoid those unwanted warnings!
_________________
Twitter
Back to top
View user's profile Send private message Visit poster's website
chrisnoden
Smarty Rookie


Joined: 17 Sep 2011
Posts: 6

PostPosted: Fri Oct 07, 2011 9:49 pm    Post subject: Sorted Reply with quote

OK thanks. I have my own error & exception handling, so have devised a way to programmatically ignore these deliberate errors.

Thanks for the help.
Back to top
View user's profile Send private message
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 -> Installation and Setup All times are GMT
Goto page Previous  1, 2, 3
Page 3 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