User tests: Successful: Unsuccessful:
When loading language files for the en-GB language JLanguage::load
method is trying to load the en-GB files two times when it only needs to do that one time.
This PR intends to corrects that.
JLanguage::load
(https://github.com/joomla/joomla-cms/blob/staging/libraries/joomla/language/language.php#L724) method a profiler mark like this: public function load($extension = 'joomla', $basePath = JPATH_BASE, $lang = null, $reload = false, $default = true)
{
!JDEBUG ?: JProfiler::getInstance('Application')->mark('');
// Code removed for brevity
!JDEBUG ?: JProfiler::getInstance('Application')->mark('<strong>Loaded</strong> ' . str_replace(JPATH_ROOT, '', $filename));
return $result;
}
load
method is being called two times in en-GB for each language file.
Check in the debug plugin "Profile Information" that the load
method is being called one time for en-GB for each language file.
Check if all language are still loaded correctly across joomla
None.
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
Labels |
Added:
?
|
I have tested this item
I have tested this item
Works fine here.
Note: I remarked some weird double loading in frontend (Tested in multilingual site, first with en-GB):
For Protostar:
same for mod_menu.ini which is loaded for each menu
On a multillingual site, as both lang files are loaded, it gets heavier when double load.
At first switch from en-GB to fr-FR, it seems Joomla "remembers" :
Loading another menu or reloading page:
we still get the protostar (same for isis in back-end) and menu double load, no more the main ini and main lib_joomla.ini
Would be nice to solve this.
Status | Pending | ⇒ | Ready to Commit |
RTC. Please tag this to 3.6.3
Labels |
Added:
?
|
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-09-10 13:04:07 |
Closed_By | ⇒ | rdeutz |
Labels |
Removed:
?
|
There are a bunch of places that load the template language files which is why you've got multiple calls for those. If you're interested, load up the 3.7 branch and add my language debug plugin that I've been messing with locally and you'll see a lot more info about that.
thanks andre
is more readable now even for me ;)