[6.1] Improve Multilanguage::getSiteHomePages()#41507
[6.1] Improve Multilanguage::getSiteHomePages()#41507HLeithner merged 14 commits intojoomla:6.1-devfrom
Conversation
|
This pull request has been automatically rebased to 5.1-dev. |
|
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. |
|
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. |
|
I have tested this item ✅ successfully on b22dc09 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/41507. |
|
I set it RTC, it seems was removed by accident and lost in time. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/41507. |
|
Is this still relevant as the code for multilingual home pages has changed since this PR was first created |
|
Yes, method getSiteHomePages still there, and still in use. |
|
This pull request has been automatically rebased to 6.1-dev. |
# Conflicts: # libraries/src/Language/Multilanguage.php
|
Thanks, I skipped the deprecation for now, since it's not so important and we need to remove the usages first. |
|
@Denitz I think we can be need to revert it, because Or maybe some extra check for |
|
Actually @joomdonation found this issue. Can you do this? |
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:
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