Feature PR-5.3-dev Pending

User tests: Successful: Unsuccessful:

avatar Denitz
Denitz
29 Aug 2023

Summary of Changes

Joomla\CMS\Language\Multilanguage::getSiteHomePages() uses an extra database query per each page load to discover the language-specific site homepages.

We can easily eliminate this extra database query and use the native SiteMenu::getItems().

Testing Instructions

Test a website with enabled multilanguage functionality and Joomla system caching enabled.

Actual result BEFORE applying this Pull Request

See an extra unoptimized SQL query per each page load:

SELECT `language`,`id` FROM `jos_menu` WHERE `home` = '1' AND `published` = 1 AND `client_id` = 0

Expected result AFTER applying this Pull Request

No extra SQL query, the homepages are discovered from the cached menu items.

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar joomla-cms-bot joomla-cms-bot - change - 29 Aug 2023
Category Libraries
avatar Denitz Denitz - open - 29 Aug 2023
avatar Denitz Denitz - change - 29 Aug 2023
Status New Pending
avatar Denitz Denitz - change - 29 Aug 2023
Labels Added: PR-4.3-dev
avatar joomla-cms-bot joomla-cms-bot - change - 22 Sep 2023
Category Libraries Unit Tests Repository Administration com_admin SQL
avatar joomla-cms-bot joomla-cms-bot - change - 22 Sep 2023
Category Unit Tests Repository Administration com_admin SQL Libraries
avatar Denitz Denitz - change - 22 Sep 2023
Title
Improve Multilanguage::getSiteHomePages()
[5.0] Improve Multilanguage::getSiteHomePages()
avatar Denitz Denitz - edited - 22 Sep 2023
avatar HLeithner
HLeithner - comment - 30 Sep 2023

This pull request has been automatically rebased to 5.1-dev.

avatar Denitz Denitz - change - 3 Oct 2023
Title
[5.0] Improve Multilanguage::getSiteHomePages()
[5.1] Improve Multilanguage::getSiteHomePages()
avatar Denitz Denitz - edited - 3 Oct 2023
avatar crommie crommie - test_item - 24 Feb 2024 - Tested successfully
avatar crommie
crommie - comment - 24 Feb 2024

I have tested this item ✅ successfully on 9ea35c7

Extra query has gone.


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

avatar viocassel viocassel - test_item - 26 Feb 2024 - Tested successfully
avatar viocassel
viocassel - comment - 26 Feb 2024

I have tested this item ✅ successfully on 9ea35c7


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

avatar Quy Quy - change - 29 Mar 2024
Status Pending Ready to Commit
avatar Quy
Quy - comment - 29 Mar 2024

RTC


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

avatar HLeithner
HLeithner - comment - 24 Apr 2024

This pull request has been automatically rebased to 5.2-dev.

avatar HLeithner HLeithner - change - 24 Apr 2024
Title
[5.1] Improve Multilanguage::getSiteHomePages()
[5.2] Improve Multilanguage::getSiteHomePages()
avatar HLeithner HLeithner - edited - 24 Apr 2024
avatar richard67 richard67 - change - 12 May 2024
Labels Added: Feature RTC b/c break PR-5.2-dev
Removed: PR-4.3-dev
avatar rdeutz
rdeutz - comment - 15 May 2024

This was discussed at the maintainers meeting today. Please don't remove the parameter but make a depeciated message for the parameter so that we can remove it in one of the next versions. Beside this the change is approved. Thanks.

avatar Quy Quy - change - 22 May 2024
Status Ready to Commit Pending
avatar Denitz Denitz - change - 23 May 2024
Labels Added: Updates Requested
Removed: RTC
avatar Denitz
Denitz - comment - 23 May 2024

@rdeutz Done. Note that I can't add @deprecated attribute because it deprecates the whole method.

avatar Quy Quy - change - 23 May 2024
Labels Removed: Updates Requested
avatar HLeithner
HLeithner - comment - 2 Sep 2024

This pull request has been automatically rebased to 5.3-dev.

avatar HLeithner HLeithner - change - 2 Sep 2024
Title
[5.2] Improve Multilanguage::getSiteHomePages()
[5.3] Improve Multilanguage::getSiteHomePages()
avatar HLeithner HLeithner - edited - 2 Sep 2024
avatar rdeutz
rdeutz - comment - 29 Oct 2024

Tests are still valid the last change was only a doc block change

avatar rdeutz rdeutz - change - 29 Oct 2024
Labels Added: PR-5.3-dev
Removed: b/c break PR-5.2-dev

Add a Comment

Login with GitHub to post a comment