(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
A menu item point to correct component should be used, since the router of the component provided a correct Itemid
You get a menu item in the URL that points to wrong component
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
Labels |
Added:
?
|
Labels |
Added:
J3 Issue
|
Category | ⇒ | com_languages com_menus Multilanguage Router / SEF |
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.
Status | New | ⇒ | Information Required |
Soon, I ll update the description of this issue with precise instructions,
using an example with core components
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 )
Status | Information Required | ⇒ | Discussion |
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
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
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.
But you are not supposed to ever be using a home page item of ALL are you?
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
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-08-21 19:13:19 |
Closed_By | ⇒ | ggppdk |
@infograf768
I think this has been reported before (but i did not find the issue / discussion)