No Code Attached Yet J4 Issue bug
avatar roland-d
roland-d
13 Jun 2018

Steps to reproduce the issue

  1. Install a clean Joomla site with database prefix jos_ (content does not matter as I provide an SQL dump)
  2. After installation replace the database with the attached SQL dump
    multilang_2018-06-13.zip
  3. You now have a multi-lingual site with 3 languages EN/DE/NL
  4. Go to the frontpage
  5. There you will see this menu and flags

image

6. Click on `Kategorie blog` 7. You get the German category blog 8. Notice you now have a submenu called `Submenu kategorie` 9. Hover the mouse over the Dutch and English flag, you can see they link to the Dutch and English submenus e.g. `http://multilang.test/en/category-blog/submenu-category` rather than the Dutch and English menus associated with the German `Kategorie blog` which would be `http://multilang.test/en/category-blog`. 10. The same happens for other languages you get the main menu, the other flags will link to the submenu.

What is going on here?
If you go to menus in the backend you will see this structure:
image

The same structure is there for Dutch and German. The parent menu is associated to the respective other parents. These parents are a category blog and the children link to exactly the same category with the difference being that the submenus have a tag filter applied.

The association works fine just not the link building.

What I found out is that the code looks for the correct menu item but does not take into account the tag setting. So as it runs through the list of available items it always ends up with the last child that has the same link as the parent. In this example there is only 1 child but if you add 5 you will notice that the link always goes to submenu number 5.

The use case here is that you have an agenda category with 20 articles and related articles are grouped by tags. The parent shows all 20 items while the submenu show a subset of those 20 based on the applied tag.

I hope I have explained this in good enough detail.

Tagging @Hackwar as discussed

Expected result

The language flag has the correct URL.

Actual result

The language flag has the incorrect URL.

System information (as much as possible)

Joomla 3.8.8
PHP 7.1
MySQL 5.7

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
5.00

avatar roland-d roland-d - open - 13 Jun 2018
avatar joomla-cms-bot joomla-cms-bot - change - 13 Jun 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 13 Jun 2018
avatar infograf768
infograf768 - comment - 13 Jun 2018

Confirm issue when Tags are used.

avatar franz-wohlkoenig franz-wohlkoenig - change - 13 Jun 2018
Category com_languages
avatar franz-wohlkoenig franz-wohlkoenig - change - 13 Jun 2018
Status New Discussion
avatar hans2103
hans2103 - comment - 13 Jun 2018

I can confirm this too as I have this exact issue on two multilingual sites.

avatar TEUCG
TEUCG - comment - 13 Jun 2018

I can confirm this tag URL issue is real on a multilingual site

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 14 Jun 2018

Status at Issue Tracker is "Discussion", so Issue is confirmed. Thanks for confirming.

avatar infograf768 infograf768 - change - 14 Jun 2018
Status Discussion Confirmed
avatar brianteeman brianteeman - change - 2 Aug 2018
Labels Added: J3 Issue
avatar brianteeman brianteeman - labeled - 2 Aug 2018
avatar AC1982-git
AC1982-git - comment - 15 Apr 2021

The issue is still present in april 2021.

avatar brianteeman
brianteeman - comment - 23 Aug 2022

I have confirmed this is still an issue with Joomla 4.

Please change the label to J4 on github

avatar zero-24 zero-24 - change - 23 Aug 2022
Labels Added: No Code Attached Yet J4 Issue
Removed: J3 Issue ?
avatar zero-24 zero-24 - unlabeled - 23 Aug 2022
avatar zero-24 zero-24 - labeled - 23 Aug 2022
avatar Hackwar Hackwar - change - 18 Feb 2023
Labels Added: bug
avatar Hackwar Hackwar - labeled - 18 Feb 2023

Add a Comment

Login with GitHub to post a comment