No Code Attached Yet J4 Issue bug
avatar woluweb
woluweb
8 Feb 2019

Steps to reproduce the issue

Context : Router is set to Modern and Remove IDs is set to Yes

Issue summarized : if there is a link to an article having no direct menu item ("single article") or no indirect menu item (link to some Parent Category, "category blog") then the link to that article will not work properly and lead incorrectly to the homepage of the site

Expected result

Links between articles should always work

Actual result

In an article (having in my case ID 23 called in my case "how-to-open-a-link-in-a-modal-window". In FR), I make a native link to another article (having in my case the ID 57 with alias is i-9-36. Also in FR)

Knowing that Router is set to Modern,

when "Remove IDs" is set to NO then
the url of the source page is /fr/tutorials/23-how-to-open-a-link-in-a-modal-window
and the link to article 57 is converted to /fr/tutorials/57-i-9-36 and leads correctly to the article

when "Remove IDs" is set to YES then
the url of the source page is /fr/tutorials/how-to-open-a-link-in-a-modal-window
and the link to article 57 is converted to /fr/tutorials/i-9-36... and leads incorrectly to the homepage !?

BUT if I create a Menu Item pointing to some Parent Category of that article, then the SEF url follows the logic the /fr/category/subcategory/article and it works !

Note for the context : the reason why there was no Menu Item like for each article is that the website has thousands or articles (legal texts)

System information (as much as possible)

J!3.9.2

Additional comments

If this is considered "normal behaviour", at least I post it here so that people having issues with Modern Router without IDs understand & have a workaround

Votes

# of Users Experiencing Issue
2/3
Average Importance Score
4.67

avatar woluweb woluweb - open - 8 Feb 2019
avatar joomla-cms-bot joomla-cms-bot - labeled - 8 Feb 2019
avatar regularlabs
regularlabs - comment - 9 Feb 2019

Just to add to this:

So issue is that - when using the Modern URL Router and Remove IDs is set to YES - urls to articles do NOT work when they do not have a menu item attached to it (or its category).

A non-SEF url like:

index.php?option=com_content&view=article&id=123&catid=45

is converted to a SEF url when passed through the JRoute::_()and returns a url like:

/category-alias/article-alias

However, that url does NOT work and redirects to the homepage.

avatar infograf768
infograf768 - comment - 10 Feb 2019

It has been explained that one always need, even as hidden, a "All categories" menu item for articles, contacts, etc, to be sure to get a nice sef url when using the so called "Modern" Routing.

Alas...

avatar regularlabs
regularlabs - comment - 10 Feb 2019

Explaining a bug doesn't make it less of a bug.

avatar woluweb
woluweb - comment - 10 Feb 2019

Modern Router as such is fine. It is only when the option "Remove IDs" is set to Yes that the bug arises.

BTW, where is it explained ?

avatar ggppdk
ggppdk - comment - 10 Feb 2019

A more proper behavior would be a fallback
a fallback like not removing the IDs from the URL ?

And parameter should be "Remove IDs if possible" ?

avatar brianteeman
brianteeman - comment - 10 Feb 2019

Explaining a bug doesn't make it less of a bug.

Exactly. It is a bug - you should not have to create a work around

avatar ggppdk
ggppdk - comment - 10 Feb 2019

It has been explained that one always need, even as hidden, a "All categories" menu item for articles, contacts, etc, to be sure to get a nice sef url when using the so called "Modern" Routing.

My approach in (not same but) similar situation is to force automatic creation of 1 or more menu items, if needed menu item(s) are "missing" , that use some generic name and generic alias

avatar infograf768
infograf768 - comment - 10 Feb 2019

Explaining a bug doesn't make it less of a bug.

Indeed. But please talk to @Hackwar about it. He says we don't structure our sites as should.
FYI, similar problem in 4.0.

avatar woluweb
woluweb - comment - 10 Feb 2019

Just a word on the context : on small (or medium) websites, this case would probably not arise often since typically every article would indeed have "its Menu Item".

I came across this issue bc I am working on a huge website (2000+ articles) commenting some Law.
So a lot of Joomla Articles don't deserve a menu item bc they are just called in a Modal (btw, this means also that nobody ever sees their URL).

Example of real content : "In the second paragraph of the new Law (...)" where second paragraph opens the paragraph in question (a Joomla Article) in a Modal.

(and so it took me a long time to understand the reason why that Modal would show the Homepage instead of the article in question in some cases but not in all cases)

avatar franz-wohlkoenig franz-wohlkoenig - change - 3 Mar 2019
Status New Discussion
avatar franz-wohlkoenig franz-wohlkoenig - change - 4 Apr 2019
Labels Added: J3 Issue
avatar franz-wohlkoenig franz-wohlkoenig - labeled - 4 Apr 2019
avatar jwaisner jwaisner - change - 24 Mar 2020
Status Discussion Confirmed
avatar brianteeman
brianteeman - comment - 23 Aug 2022

Please change label to j4

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 - labeled - 23 Aug 2022
avatar zero-24 zero-24 - unlabeled - 23 Aug 2022
avatar Hackwar Hackwar - change - 19 Feb 2023
Labels Added: bug
avatar Hackwar Hackwar - labeled - 19 Feb 2023
avatar N8Solutions
N8Solutions - comment - 18 Sep 2023

I know this was reported a long time ago. I just ran into this and luckily found this open issue. While it doesn't fix the problem, I'm appreciative of the workaround that @infograf768 posted above.

Is this still being worked on or has it been sidelined for now?

avatar Hackwar
Hackwar - comment - 19 Sep 2023

Don't expect any changes here soon.

avatar N8Solutions
N8Solutions - comment - 20 Sep 2023

Don't expect any changes here soon.

Thank you for the reply @Hackwar.
So until the time comes, the only way to do this successfully is to use the workaround which is to
add a hidden menu item
select Article, then "List All Categories"
and either select "Root" for the "top level category" or select the category we're interested in showing.

Add a Comment

Login with GitHub to post a comment