? ? Pending

User tests: Successful: Unsuccessful:

avatar infograf768
infograf768
23 Dec 2019

Pull Request for Issue #27236 (comment)

Summary of Changes

Since the beginning of the multilingual feature in Joomla, it was designed to be able to prepare a site with a Content Language even if the site corresponding language was not yet installed.

This has been broken by forcing $checkInstalled to be true in https://github.com/joomla/joomla-cms/blob/4.0-dev/libraries/src/Language/LanguageHelper.php#L365 (3.7.0)
and using true in other places where the getContentLanguages() method is used.

It may have been necessary at the time, but afaik it is useless now and breaks the feature.

This PR sets $checkInstalled to false by default and modifies to false the instances where true is used.

Testing Instructions

Install a multingual site with the multilingual sample data.
Create a new Content Language without its site Language. Let's use for example pt-PT for the demo
Create category and content (article, menus, categories, newsfeeds, contacts), tagged to the Content Language: no problem with that.

Edit an item NOT tagged to the pt-PT Content Language, switch to the Associations tab.
pt-PT will not display.
Display the Multilingual Associations component: same result, pt-PT will not display.

Patch and test again

After patch, test that all works fine in frontend. pt-PT should not display in the module switcher, etc.

After patch

All goes fine.
Example: Portuguese (pt-PT) displays fine in Associations Tab:
Screen Shot 2019-12-23 at 11 06 55

Documentation Changes Required

It may need a change indeed if there is a doc about it...

@Fedik

avatar infograf768 infograf768 - open - 23 Dec 2019
avatar infograf768 infograf768 - change - 23 Dec 2019
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 23 Dec 2019
Category Administration com_categories com_contact com_content com_menus com_newsfeeds Libraries
avatar Fedik
Fedik - comment - 23 Dec 2019

thanks for fix, I will test this evening

avatar Fedik Fedik - test_item - 23 Dec 2019 - Tested successfully
avatar Fedik
Fedik - comment - 23 Dec 2019

I have tested this item successfully on 5c9d2d5


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

avatar infograf768 infograf768 - change - 23 Dec 2019
Labels Added: ?
avatar infograf768
infograf768 - comment - 27 Dec 2019

Note: com_mails may be considered as a specific case where true has to be used if the code remains as is... But the original creator of this component refused to accept my input.

I still think that getContentLanguages() is the wrong method to use there if the site is not multilingual.
It should use getInstalledLanguages() and not display flags but badges with the language tag.

If the site is multilingual, it could use getContentLanguages() with true added i.e. making sure the corresponding language is installed.

avatar richard67 richard67 - test_item - 27 Dec 2019 - Tested successfully
avatar richard67
richard67 - comment - 27 Dec 2019

I have tested this item successfully on 17c6a5e


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

avatar richard67 richard67 - change - 27 Dec 2019
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 27 Dec 2019

RTC


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

avatar richard67 richard67 - alter_testresult - 27 Dec 2019 - Fedik: Tested successfully
avatar richard67
richard67 - comment - 27 Dec 2019

Test result of Fedik was still valid because commits after his test were just updates to 4.0-dev without any changes on this PR.

avatar richard67 richard67 - change - 27 Dec 2019
Status Ready to Commit Pending
avatar richard67
richard67 - comment - 27 Dec 2019

Back to pending due to review comment here: #27341 (comment)


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

avatar richard67 richard67 - test_item - 27 Dec 2019 - Not tested
avatar richard67
richard67 - comment - 27 Dec 2019

I have not tested this item.


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

avatar infograf768
infograf768 - comment - 27 Dec 2019

Will change tomorrow

avatar richard67
richard67 - comment - 27 Dec 2019

Then I will test tomorrow ;-)

avatar joomla-cms-bot joomla-cms-bot - change - 28 Dec 2019
Category Administration com_categories com_contact com_content com_menus com_newsfeeds Libraries Administration com_associations com_categories com_contact com_content com_menus com_newsfeeds Libraries
avatar infograf768
infograf768 - comment - 28 Dec 2019

@Fedik @richard67 @HLeithner
Modified in order to not change the library.

Please test again.

avatar richard67 richard67 - test_item - 28 Dec 2019 - Tested successfully
avatar richard67
richard67 - comment - 28 Dec 2019

I have tested this item successfully on 64fe02e


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

avatar Fedik Fedik - test_item - 28 Dec 2019 - Tested successfully
avatar Fedik
Fedik - comment - 28 Dec 2019

I have tested this item successfully on 64fe02e


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

avatar richard67 richard67 - change - 28 Dec 2019
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 28 Dec 2019

RTC


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

avatar HLeithner HLeithner - change - 28 Dec 2019
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2019-12-28 13:11:22
Closed_By HLeithner
Labels Added: ?
avatar HLeithner HLeithner - close - 28 Dec 2019
avatar HLeithner HLeithner - merge - 28 Dec 2019
avatar HLeithner
HLeithner - comment - 28 Dec 2019

Thanks

Add a Comment

Login with GitHub to post a comment