? Success

User tests: Successful: Unsuccessful:

avatar andrepereiradasilva
andrepereiradasilva
9 Sep 2016

Summary of Changes

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.

Testing Instructions

    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;
    }
  • Check in the debug plugin "Profile Information" that the load method is being called two times in en-GB for each language file. image
  • Apply patch
  • Add the profiler marks again to the file
  • Check in the debug plugin "Profile Information" that the load method is being called one time for en-GB for each language file.
    image

  • Check if all language are still loaded correctly across joomla

Documentation Changes Required

None.

avatar andrepereiradasilva andrepereiradasilva - open - 9 Sep 2016
avatar andrepereiradasilva andrepereiradasilva - change - 9 Sep 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 9 Sep 2016
Category Libraries
avatar joomla-cms-bot joomla-cms-bot - change - 9 Sep 2016
Labels Added: ?
avatar alikon
alikon - comment - 9 Sep 2016

thanks andre
is more readable now even for me ;)

avatar alikon alikon - test_item - 9 Sep 2016 - Tested successfully
avatar alikon
alikon - comment - 9 Sep 2016

I have tested this item successfully on 02174ee


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11997.

avatar infograf768 infograf768 - test_item - 10 Sep 2016 - Tested successfully
avatar infograf768
infograf768 - comment - 10 Sep 2016

I have tested this item successfully on 02174ee


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11997.

avatar infograf768
infograf768 - comment - 10 Sep 2016

Works fine here.

Note: I remarked some weird double loading in frontend (Tested in multilingual site, first with en-GB):
For Protostar:
screen shot 2016-09-10 at 11 34 11

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" :
screen shot 2016-09-10 at 11 38 22

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

screen shot 2016-09-10 at 11 45 07

Would be nice to solve this.

avatar infograf768 infograf768 - change - 10 Sep 2016
Status Pending Ready to Commit
avatar infograf768
infograf768 - comment - 10 Sep 2016

RTC. Please tag this to 3.6.3


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11997.

avatar joomla-cms-bot joomla-cms-bot - change - 10 Sep 2016
Labels Added: ?
avatar rdeutz rdeutz - change - 10 Sep 2016
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
avatar rdeutz rdeutz - close - 10 Sep 2016
avatar rdeutz rdeutz - merge - 10 Sep 2016
avatar joomla-cms-bot joomla-cms-bot - close - 10 Sep 2016
avatar joomla-cms-bot joomla-cms-bot - change - 10 Sep 2016
Labels Removed: ?
avatar mbabker
mbabker - comment - 10 Sep 2016

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.

Add a Comment

Login with GitHub to post a comment