? Success

User tests: Successful: Unsuccessful:

avatar SniperSister
SniperSister
12 Nov 2013
avatar SniperSister SniperSister - open - 12 Nov 2013
avatar mbabker
mbabker - comment - 12 Nov 2013

It's weird you need that check, I'm curious what would be calling getTemplate() before it gets loaded up in initialiseApp()

avatar SniperSister
SniperSister - comment - 12 Nov 2013

It's a template club plugin that fires getTemplate() in the onAfterInitialise event.

avatar mbabker
mbabker - comment - 12 Nov 2013

Hmm... OK, so I'd suggest moving the first getLanguage() check to just after this check since that's before onAfterInitialise and that should cover all cases.

avatar SniperSister
SniperSister - comment - 12 Nov 2013

Wouldn't it be easier to just swap these calls?

    // Execute the parent initialiseApp method.
    parent::initialiseApp($options);

    // Load the language to the API
    $this->loadLanguage();

    // Load Library language
    $lang = $this->getLanguage();

    // Register the language object with JFactory
    JFactory::$language = $lang;
avatar mbabker
mbabker - comment - 12 Nov 2013

I'm pretty sure there's a reason I did it that way specifically, but I honestly can't remember anymore. If it works, I say go for it.

avatar SniperSister
SniperSister - comment - 12 Nov 2013

Do you have any possibility to check why you did this that way? Don't want to introduce a new bug while fixing the old one? ;)

avatar mbabker
mbabker - comment - 12 Nov 2013

Unfortunately, I've already deleted all of my older branches which had that history in them.

avatar SniperSister
SniperSister - comment - 13 Nov 2013

Ok, I moved it

avatar Aufklatscher
Aufklatscher - comment - 13 Nov 2013

Hallo

Helps this to fix "Call to a member function get() on a non-object in /www/htdocs/w00fce56/...../system/remember/remember.php on line94 ??

Im from germany. My english is not the best.

regards

avatar SniperSister
SniperSister - comment - 14 Nov 2013

No, this doesn't fix the issue with the rememberme plugin.

avatar efEris
efEris - comment - 15 Nov 2013

I come to the same problem, a plugin calls the getTemplate function in onAfterInitialise, moving the parent::initialiseApp call after the $this->loadLanguage(); call fixes this problem.

The patch does the same, it calls the loadLanguage function, so make it sense to call the onAfterInitialise event if the application is not fully initialised?

avatar mbabker
mbabker - comment - 16 Nov 2013

So what if we do this instead - mbabker@joomla:master...mbabker:32675

I don't see a reason why we can't just load in the language object and global files before handing over processing to the parent initialiseApp method in both site and admin. That should take care of all concerns.

avatar efEris
efEris - comment - 17 Nov 2013

I think thats a much better Idea. More consistent and does the same as the check with more control.

I'm doing this already and it works fine.

avatar SniperSister
SniperSister - comment - 17 Nov 2013

I'm perfectly fine with that. Michael? Could you please add your PR to the tracker?

avatar mbabker
mbabker - comment - 18 Nov 2013

PR at #2545 and updating tracker now.

avatar SniperSister SniperSister - close - 18 Nov 2013
avatar SniperSister SniperSister - head_ref_deleted - 18 Nov 2013

Add a Comment

Login with GitHub to post a comment