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  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 -> Installation and Setup
View previous topic :: View next topic  
Author Message
adn
Smarty Regular


Joined: 31 May 2011
Posts: 91

PostPosted: Tue Sep 20, 2011 8:42 pm    Post subject: Reply with quote

So my code is
$smarty->addPluginsDir(SMARTY.'/plugins'); // my plugins dir

If I switch back to the 3.0.9 it works !!!

Is there a bug ?
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: Tue Sep 20, 2011 8:55 pm    Post subject: Reply with quote

I'm pretty sure there's no bug with addPluginsDir().
what does $smarty->testInstall() say?
_________________
Twitter
Back to top
View user's profile Send private message Visit poster's website
adn
Smarty Regular


Joined: 31 May 2011
Posts: 91

PostPosted: Tue Sep 20, 2011 9:25 pm    Post subject: Reply with quote

OK I switched to 3.1.0

1/ the display is ok
2/ I delete the compiled templates
3/ I delete the cache of the template
4/ I get a white page
5/ I added a TestInstall and I get

Quote:
Smarty Installation test...
Testing template directory...
<myWebRoot>/inc/smarty/templates/ is OK.
Testing compile directory...
<myWebRoot>/cache/smarty/templates_c/ is OK.
Testing plugins directory...
<myWebRoot>/inc/smarty/plugins/ is OK.
Testing cache directory...
<myWebRoot>/cache/smarty/cache/ is OK.
Testing configs directory...
<myWebRoot>/cache/smarty/configs/ is OK.
Testing sysplugin files...
... OK
Testing plugin files...
... OK
Tests complete.


In the 3.0.9 version I have

Quote:
Testing plugins directory...
<myWebRoot>/inc/smarty/libs/plugins/ is OK.
<myWebRoot>/inc/smarty/plugins is OK.


The libs/plugins is missing.....

Note: <myWebRoot> is the path to my website on the server
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: Wed Sep 21, 2011 12:09 pm    Post subject: Reply with quote

One possibility is that the __construct() constructor of the Smarty class does not run at all or not first if you have an extended Smarty class.

Code:
class myclass extends Smarty {

   function __construct()
   {

        // Class Constructor.
        // These automatically get set with each new instance.

        parent::__construct();

        $this->addPluginDir(..);
}


But this should be almost same in 3.0....
Back to top
View user's profile Send private message
adn
Smarty Regular


Joined: 31 May 2011
Posts: 91

PostPosted: Wed Sep 21, 2011 1:06 pm    Post subject: Reply with quote

Hi,

I haven't extended the smarty class. Only my tpl extends another one.

In 3.0.9, everything is ok with exactly the same code to initialize the plugins. But the TestInstall API does not output the same, should it do display the same?
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 Sep 21, 2011 6:58 pm    Post subject: Reply with quote

What can I do to understand where is the problem?
Back to top
View user's profile Send private message Visit poster's website
mohrt
Administrator


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

PostPosted: Wed Sep 21, 2011 7:05 pm    Post subject: Reply with quote

I believe we found the problem, as of 3.1 loadPlugin() internally lower-cases the modifer filename before matching, so mixed-case modifiers are not working right. A fix is coming. [edit] fixed in trunk.
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 Sep 21, 2011 8:07 pm    Post subject: Reply with quote

Hi Mohrt,

What does that mean "fixed in trunk"?

I re-downloaded the 3.1 and I still have the problem.
Back to top
View user's profile Send private message Visit poster's website
mohrt
Administrator


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

PostPosted: Wed Sep 21, 2011 8:12 pm    Post subject: Reply with quote

that means you can download the SVN version, which has the latest bug fixes. If you don't have SVN or know what that means, then you might just wait for the next release.
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: Wed Sep 21, 2011 8:16 pm    Post subject: Reply with quote

http://code.google.com/p/smarty-php/source/browse/trunk << SVN trunk
http://code.google.com/p/smarty-php/source/checkout << help to "download"
_________________
Twitter
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 Sep 22, 2011 6:23 am    Post subject: Reply with quote

OK thanks, I understood and I see the modified files.
Back to top
View user's profile Send private message Visit poster's website
chrisnoden
Smarty Rookie


Joined: 17 Sep 2011
Posts: 6

PostPosted: Thu Sep 22, 2011 2:25 pm    Post subject: Fixed Reply with quote

I can confirm the latest release has fixed the problem for me also. Thank you.
Back to top
View user's profile Send private message
adn
Smarty Regular


Joined: 31 May 2011
Posts: 91

PostPosted: Thu Sep 22, 2011 5:52 pm    Post subject: Reply with quote

I just updated Smarty.class.php and it works !
Thanks
Back to top
View user's profile Send private message Visit poster's website
adn
Smarty Regular


Joined: 31 May 2011
Posts: 91

PostPosted: Sun Sep 25, 2011 1:18 pm    Post subject: Reply with quote

Hi all,

In fact I discovered that everything is not fixed with the 3.1.1. In some cases my pages are not completely displayed. I think it is still linked to plugins.

So I switched back to the 3.0.9 and everything is ok

Tell me what you need to understand the problem
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: Sun Sep 25, 2011 1:25 pm    Post subject: Reply with quote

Lets start with error messages.
Code:
error_reporting(E_ALL);
ini_set('display_errors', 'on');

should ouput errors to screen. Otherwise setup error_logging.
_________________
Twitter
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 -> Installation and Setup 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