User tests: Successful: Unsuccessful:
It's a template club plugin that fires getTemplate() in the onAfterInitialise event.
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.
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;
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.
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? ;)
Unfortunately, I've already deleted all of my older branches which had that history in them.
Ok, I moved it
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
No, this doesn't fix the issue with the rememberme plugin.
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?
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.
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.
I'm perfectly fine with that. Michael? Could you please add your PR to the tracker?
It's weird you need that check, I'm curious what would be calling getTemplate() before it gets loaded up in initialiseApp()