No Code Attached Yet
avatar marcin17
marcin17
17 Dec 2024

This is a generic problem in Joomla when any category has subcategory and article with the same id, then routing to the article does not work from the category view. I have reproduced this problem on 4 websites.

Steps to reproduce the issue

Reproduce:

  1. create a categoryA with id:A
  2. create a subcategoryB with id: B
  3. create an articleB with id: B and assign into categoryA
  4. create a menu item displaying list of articles from category A – so far all articles including articleB are displayed correctly.
  5. click on articleB on the list
  6. Joomla does not open the articleB full view, but it opens the preview of articles from categoryB
  7. it seems instead of routing to article id:B Joomla routes to category id:B

I have constructed a demo of this bug under the link:

https://easyhomebaking.com/cookies

Category "45:Cookies" contains:

  • subcategory "64:Macarons"
  • article "64:Test article from Cookies with same id as subcategory Macarons"
  1. open the preview of the category 45:Cookies
    https://easyhomebaking.com/cookies

  2. click on the article "64:Test article from Cookies with same id as subcategory Macarons"

  3. instead of opening the article:64 Joomla display a preview of the category:64 "Macarons"

following URL https://easyhomebaking.com/cookies/64-article-64 instead of opening article 64 it display the category 64

Expected result

there should not be any conflicts between subcategory and article with the same id inside any parent category. Article should open correctly in a full view

Actual result

Article does not open at all, instead under the article url/path incorrectly display the content of the category with same id

System information (as much as possible)

Joomla 5.2.2
Template - shaper_helixultimate

Additional comments

avatar marcin17 marcin17 - open - 17 Dec 2024
avatar joomla-cms-bot joomla-cms-bot - change - 17 Dec 2024
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 17 Dec 2024
avatar Hackwar Hackwar - change - 17 Dec 2024
Status New Closed
Closed_Date 0000-00-00 00:00:00 2024-12-17 20:01:02
Closed_By Hackwar
avatar Hackwar Hackwar - close - 17 Dec 2024
avatar Hackwar
Hackwar - comment - 17 Dec 2024

I'm sorry, but this is an inherent limitation of the routing and can't really be changed. You should either switch off IDs or create the same article again, resulting in a new ID. This is a definitive wontfix.

avatar marcin17
marcin17 - comment - 17 Dec 2024

hi @Hackwar,

thanks for answer but I do not agree.

  1. bug is a bug. Please do not immediately reject a bug / accept it without any approval or suggestion.

  2. this problem seems to be introduced in J4 or J5. I have migrated the content from J3 to J5 keeping all IDs (using J2XML extension) and the problem just come with J5.

I have double checked the old installation of similar website in J3, where I have the same constellation of article id:64 and subcategory id:64 and there is NO problem like that.

I have been informed by users that some articles just disappeared after migration from J3 to J4/J5 because of this bug.

The biggest issue with this BUG is that it could happen without any awareness of the administrator. This conflict can happen at any time / any category, when moving articles between categories or changing the hierarchy of the categories. Is not possible to track such conflicts to check any time if the created article is in a conflict with some category id.

I would first suggest to check why this was working correctly in J3

many thanks in advance
Marcin

avatar marcin17
marcin17 - comment - 17 Dec 2024

Please reopen. The issue seems to be a new bug in J4 in compare to J3

avatar brianteeman
brianteeman - comment - 18 Dec 2024

Switch off id - problem solved

avatar marcin17
marcin17 - comment - 18 Dec 2024

I use the article ID in the url since years, many thousand articles are indexed by google and other search machines, I do not want just with one click make all my urls invalid / kill my SEO scoring of all my websites.

After disabling the ID the old URLs end up with 404. I would need to manually configure redirects for all articles - this is not a solution.

Having ID in the article url has more advantages - what I see - moving article to another category or menu item keep the article url still valid and article can be open (I have additionally implemented a plugin which in the background resolve the actual article URL and redirect to it if the article is called using old, invalid url)

If Joomla would automatically redirect the old urls having article ID to the new valid URLs without ID - this would be solution but not just killing the whole website ...

avatar marcin17
marcin17 - comment - 18 Dec 2024

anyway this is also a long lasting problem in Joomla since the beginning.

Some other CMS can automatically track, manage and redirect article urls after moving articles, categories or other changes. In Joomla this always ends up with article not found and manual solution or managing manual redirects using extensions, pluigins etc ..

avatar Hackwar
Hackwar - comment - 19 Dec 2024

Joomla 5.3 will contain an automatic redirection from ID-based URLs to non-ID-based URLs.

avatar marcin17
marcin17 - comment - 19 Dec 2024

hi guys,
thanks .. this is a very good news ...
with love to Joomla and greetings to the team developing the best CMS system on the world :)

Add a Comment

Login with GitHub to post a comment