User tests: Successful: Unsuccessful:
This fixes #7620. Read on to see why no developer should ever debug configuration issues while sober in Joomla.
With the changes from #7173 JFactory::getDbo()
is now called from the application constructor. In the install application, the configuration is not yet loaded into JFactory::$config
so when this call is made, Joomla attempts to populate that too. The default path in JFactory::getConfig()
doesn't align to the path that the CMS writes its configuration to, so the real configuration (which is available at the point the installer is at now) doesn't get loaded. Because of a string of very inconsistent and borderline crazy behaviors, this actually works OK in the site/admin apps because they preload JConfig
so the class exists in the filesystem and JFactory is able to load it when the time comes. Hat tip to @wilsonge and his lost sanity chasing that one down. Since JFactory::getDbo()
has been called and a default configuration object is now persisted into the factory, the factory now also includes a database object that can't connect to the database because it wasn't loaded with the right configuration.
We have to reset the configuration and database objects in the factory to force it to recreate them with the correct data to get past this error, and that is changed in InstallationModelLanguages
.
Because of #5088 being merged and it bringing a bit more strictness with session bootup, errors were getting tossed out because we were previously resetting JFactory::$session
which is causing the session to be booted twice. I wish I could remember why that was happening, all I know is it was needed at some point. After fixing the database error, the language install UI appeared to be "hanging", but inspecting requests with the Chrome Dev Tools showed that PHP errors were getting thrown because we were basically booting the session twice and setting config values after a session had been started, a big no-no. So, unsetting the session from the factory is no longer performed too.
Just run through the installer and make sure the darn thing works.
Status | New | ⇒ | Pending |
Labels |
Added:
?
|
Milestone |
Added: |
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-08-04 13:25:06 |
Closed_By | ⇒ | Kubik-Rubik |
Category | ⇒ | Installation |
Easy | No | ⇒ | Yes |
Test OK here. Issue solved.
Thank you for the great explanation and the fix, @mbabker. Works as described!