J3 Issue ?
avatar ggppdk
ggppdk
3 Apr 2018

Steps to reproduce the issue

(SEF urls are ON)
When you have a home menu item of language ALL and home page of specific languages point to a different component

If you try to build a SEF URL that contains &Itemid=NNN
and NNN menu item is the home page menu item for language ALL

you end up having
e.g. if current language is english
domain/en/segment1/segment2/

but the English home page menu item points a different component
Thus the resulting URL either gives 404 or it displays a wrong page

See example from duplicate issue #21448
diff_home_menu_all

Expected result

A menu item point to correct component should be used, since the router of the component provided a correct Itemid

Actual result

You get a menu item in the URL that points to wrong component

System information (as much as possible)

Additional comments

The effect is because of home item check here, skips adding the "menu route path" (menu aliases) if provided Itemid is a home page
but this code does not account that the language-related routing code will use a home page menu item of a specific language

https://github.com/joomla/joomla-cms/blob/staging/libraries/src/Router/SiteRouter.php#L511-L541

avatar ggppdk ggppdk - open - 3 Apr 2018
avatar joomla-cms-bot joomla-cms-bot - change - 3 Apr 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 3 Apr 2018
avatar ggppdk ggppdk - change - 3 Apr 2018
The description was changed
avatar ggppdk ggppdk - edited - 3 Apr 2018
avatar ggppdk
ggppdk - comment - 3 Apr 2018

@infograf768
I think this has been reported before (but i did not find the issue / discussion)

avatar ggppdk ggppdk - change - 3 Apr 2018
The description was changed
avatar ggppdk ggppdk - edited - 3 Apr 2018
avatar brianteeman brianteeman - change - 3 Apr 2018
Labels Added: J3 Issue
avatar brianteeman brianteeman - labeled - 3 Apr 2018
avatar franz-wohlkoenig franz-wohlkoenig - change - 4 Apr 2018
Category com_languages com_menus Multilanguage Router / SEF
avatar infograf768
infograf768 - comment - 5 Apr 2018

Not sure I understand.

If you try to build a SEF URL that contains &Itemid=NNN
and NNN menu item is the home page menu item for language ALL

why would you try to build a URL with an itemid which no one should use?

Please be nice to me and give precise instructions to test with core to reproduce your issue.

avatar franz-wohlkoenig franz-wohlkoenig - change - 5 Apr 2018
Status New Information Required
avatar ggppdk
ggppdk - comment - 5 Apr 2018

Soon, I ll update the description of this issue with precise instructions,
using an example with core components

avatar infograf768
infograf768 - comment - 6 Apr 2018

FYI, I found an issue that does not look exactly related to what you describe but is nevertheless frustrating.

Set the Home page tagged to ALL languages as a Smart Search menu item.
Then add a Smart Search module wherever on site (language is not important).

Try to search anything => as the smart search menu item is set to the Home set to ALL, one can't get the search results. One remains on the same page.

(Note: choosing an itemid in the module to another page than that home has no effect )

avatar franz-wohlkoenig franz-wohlkoenig - change - 7 Apr 2018
Status Information Required Discussion
avatar ggppdk ggppdk - change - 8 Aug 2018
The description was changed
avatar ggppdk ggppdk - edited - 8 Aug 2018
avatar ggppdk
ggppdk - comment - 8 Aug 2018

Sorry for not updating description earlier

I have updated description with a picture from duplicate issue #21448
to see the issue just create the setup that you see in the picture

  • Type of components is not important,
  • important is to have different components

and you will get either wrong page shown (if you are "lucky") or usually a 404 error

I understand that this configuration is not common,
but it should at least be documented that using a different type of menu item for home page ALL will not work,

then if someone is willing to spend time at the router, i have linked to the code that creates the issue, sorry i cannot spend time for this now

I have opened this issue , because it was originally reported as bug in our component , so i did spend already 2 hours tracking down the issue

avatar infograf768
infograf768 - comment - 8 Aug 2018

Tested here with Home tagged to ALL as a Newsfeed menu item and Languages Home are content.
No p.

I still do not fully understand your issue.
To me, it looks like we can get issues only when the Home tagged to ALL menu item may be needed by another component or module which is reached via Content Language and such a menu item type does not exist for these Content Languages.
Example the Smartsearch above or a Login form.

avatar brianteeman
brianteeman - comment - 8 Aug 2018

But you are not supposed to ever be using a home page item of ALL are you?

avatar ggppdk
ggppdk - comment - 21 Aug 2018

I am closing this

I don't know if something, has changed since i opened this,

but do not want to go looking around now
as this does not seem easy to replicate or some other work made it harder to occur
or even fixed it completely in very recent versions

i will watch for it, and if i come across it again i will reopen it, with more details

avatar ggppdk ggppdk - change - 21 Aug 2018
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2018-08-21 19:13:19
Closed_By ggppdk
avatar ggppdk ggppdk - close - 21 Aug 2018

Add a Comment

Login with GitHub to post a comment