J3 Issue ?
avatar Giuse69
Giuse69
15 Oct 2018

Steps to reproduce the issue

A multilingual site. Create a menu item MENU_A in language LANG_A pointing to a category CAT, another menu item MENU_B in language LANG_B pointing to the same category CAT.
Create an article with language all inside CAT.

Go to frontend, select LANG_A in laguage switcher module, select the menu item MENU_A, you will see the article in LANG_A. Click on that article.
Now look at the language switcher module:

Actual result

the flag link for LANG_B points just to MENU_B since it asks for content association and since there is no explicit association of the article to LANG_B (getAssociations).
.

Expected result

The flag link in the language switcher for LANG_B should point to the current article with MENU_B.
Language switcher module and language filter plugin should treat an item (at least an articles) with language "all" as they have implicit associations to any language, since the version of an article in another language is the article itself.
This can be accomplished but checking article language in mod_languages and language filter plugin or modifying getAssociations() function to return association also for item that do not have one but are themself multilingual.

System information (as much as possible)

Joomla 3.8.13

Additional comments

avatar Giuse69 Giuse69 - open - 15 Oct 2018
avatar joomla-cms-bot joomla-cms-bot - change - 15 Oct 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 15 Oct 2018
avatar infograf768
infograf768 - comment - 16 Oct 2018

I guess you have associated both menu items as they are tagged to different content languages.
I also guess the CAT is tagged to ALL languages and you have various articles in it, some tagged to ALL languages, some tagged to different content languages (or not).
Associations just can't work when items are set to ALL languages.
I have no idea how to implement automatically your expected result.

The only way I know that you could use would be to create specific menu items to display such single article tagged to ALL, menu items themselves tagged to each content language and associated.
These menu items could be hidden.
I understand this is manageable when you have few articles of that kind, but not when you have a lot of them.

avatar Giuse69
Giuse69 - comment - 29 Oct 2018

I am studying a possible solution, basically not changing the association detection but triggering detection of a "language all" article and using association among menu items.
I will update as soon as I have some example code..

avatar brianteeman brianteeman - change - 30 Oct 2018
Labels Added: J3 Issue
avatar brianteeman brianteeman - labeled - 30 Oct 2018
avatar Giuse69
Giuse69 - comment - 11 Nov 2018

Prepared a PR #23037 to solve this.

avatar Quy Quy - change - 11 Nov 2018
Status New Closed
Closed_Date 0000-00-00 00:00:00 2018-11-11 16:30:45
Closed_By Quy
avatar joomla-cms-bot joomla-cms-bot - change - 11 Nov 2018
Closed_By Quy joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 11 Nov 2018
avatar joomla-cms-bot
joomla-cms-bot - comment - 11 Nov 2018

Set to "closed" on behalf of @Quy by The JTracker Application at issues.joomla.org/joomla-cms/22656

Add a Comment

Login with GitHub to post a comment