[6.1] Improve Multilanguage::getSiteHomePages() - fix for CLI app#47310
Closed
Denitz wants to merge 16 commits intojoomla:6.1-devfrom
Closed
[6.1] Improve Multilanguage::getSiteHomePages() - fix for CLI app#47310Denitz wants to merge 16 commits intojoomla:6.1-devfrom
Denitz wants to merge 16 commits intojoomla:6.1-devfrom
Conversation
# Conflicts: # libraries/src/Language/Multilanguage.php
# Conflicts: # libraries/src/Language/Multilanguage.php # libraries/src/Menu/AbstractMenu.php
4 tasks
Member
|
Thanks, but that's not a real solution. Now we have the same code twice and no long term solution. Any other idea? And a long time plan? maybe deprecated the support of applications which don't support the "menu"? |
HLeithner
reviewed
Mar 6, 2026
|
|
||
| // Get all site homepages. | ||
| /** @var SiteMenu $menu */ | ||
| $menu = Factory::getApplication()->getMenu('site'); |
Member
There was a problem hiding this comment.
That will not work since ConsoleApplication has no getMenu() method.
Member
|
I think revert is the better way for the moment and deprecate the method and remove it in 8.0. I checked the usages and all of them can directly or indirectly access the |
Member
|
I'm closing this please see #41507 (comment) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request resolves issue with merged #41507.
Summary of Changes
Keep old logic for CliApplication because it doesn't have
getMenu()method defined inCMSWebApplicationInterface.Testing Instructions
call
Joomla\CMS\Language\Multilanguage::getSiteHomePages()in CLI command.Actual result BEFORE applying this Pull Request
Error
Expected result AFTER applying this Pull Request
No error
Link to documentations
Please select:
Documentation link for guide.joomla.org:
No documentation changes for guide.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed