No Code Attached Yet bug
avatar uglyeoin
uglyeoin
11 May 2021

Steps to reproduce the issue

Make sure SEF is turned on (I haven't tested without it, but I assume it causes the same issue). But I guess there's a question as to whether this is SEF or the router.

Create a category. Give it an alias of "blog"

A two articles to the category of blog.
Create first article.
Give it an alias of "an-article"
Add some content and a read more
Add another article.
Give that some content and a read more.
Give it an alias of "blog-article"

Create another category. Give it an alias of "an-article"
Make it a subcategory of another category

Create a menu item of type category blog.
Link to the blog category.
Give an alias of blog
View this page

Expected result

Clicking read more goes to the article.

Actual result

On one article read more reaches the article.
The other article's read more goes to the category.
Totally different an unintended behaviour.

System information (as much as possible)

systeminfo-2021-05-11T20 49 36+01 00.txt

Additional comments

I am using the modern router setting

Votes

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

avatar uglyeoin uglyeoin - open - 11 May 2021
avatar joomla-cms-bot joomla-cms-bot - labeled - 11 May 2021
avatar uglyeoin uglyeoin - change - 11 May 2021
The description was changed
avatar uglyeoin uglyeoin - edited - 11 May 2021
avatar sandramay0905
sandramay0905 - comment - 12 May 2021

Maybe not relevant but you use litespeed and i read in other threads that joomla isn't official working on that (if i remember correct).

avatar uglyeoin
uglyeoin - comment - 12 May 2021

Litespeed has an official Joomla! plugin that is currently disabled until I work out some of the issues. I don't know if you meant officially by Litespeed or officially by Joomla

avatar brianteeman
brianteeman - comment - 12 May 2021

it is not related to the issue

avatar sandramay0905
sandramay0905 - comment - 13 May 2021

Cannot confirm the issue.

The steps where not so clear, so i guess the second category didn't get a menu. Also i test modern routing with removed ids from url and not.

I test on a multilingual site, but categories, articles and menu for the issues are set on all languages.

The backend of articles and categories:

image

Please have a look at [url deleted], maybe i missed something.

avatar uglyeoin
uglyeoin - comment - 13 May 2021

Can you turn on so we can see the category names on your test site? The menu item shouldn't be called read more. That can be called blog or something (doesn't really matter but it is confusing)

avatar uglyeoin
uglyeoin - comment - 13 May 2021

Or is there a way you can give me access to testsite so I can ensure it has the same setup?

avatar uglyeoin
uglyeoin - comment - 13 May 2021

If you need to contact me just fill in the contact from www.squareballoon.co.uk

avatar sandramay0905
sandramay0905 - comment - 13 May 2021

Category title now shows, [url deleted]

avatar uglyeoin
uglyeoin - comment - 13 May 2021

I meant when I click on an article to see what category it is in.

I did remember one other factor. The category was a subcategory. Perhaps that made a difference.

avatar sandramay0905
sandramay0905 - comment - 13 May 2021

I did remember one other factor. The category was a subcategory. Perhaps that made a difference.

Dear @uglyeoin, can you please give exact informations in your opening comment?

avatar uglyeoin uglyeoin - change - 13 May 2021
The description was changed
avatar uglyeoin uglyeoin - edited - 13 May 2021
avatar uglyeoin
uglyeoin - comment - 13 May 2021

Ok I have updated, good advice thank you.

avatar sandramay0905
sandramay0905 - comment - 13 May 2021

After the new information i cannot conform the issue.

avatar Hackwar
Hackwar - comment - 5 Dec 2022

The original issue was for Joomla 3.9, which we stopped bugfixes for a few months ago. In Joomla 4 you could generate this situation by setting the option to remove the IDs from the URL, then creating a category with a menu item and in that category creating a subcategory and an article with the same alias. In that case, Joomla will always try to load the category first and it would not be possible to access the article. I would assume that this is expected behavior and if someone would create such a setup, it would be the fault of the person and not exactly that of Joomla. We could introduce a check to compare the aliases of child categories of the category of an article and the article itself when editing it to either stop saving an article with such an alias or to at least display a warning, both only in case that SEF option is set.

avatar uglyeoin
uglyeoin - comment - 5 Dec 2022

I think a check is a good solution. Fault of the user or not, unless you know how the route works, you don't know that is the reason. I didn't know that, and many ordinary Joomla users wouldn't know that. Rather than trying to choose who is to blame I think a check would be a good option.

avatar brianteeman
brianteeman - comment - 5 Dec 2022

ah the "inception" check. Nice idea but technically can only work some of the time.

avatar Hackwar
Hackwar - comment - 5 Dec 2022

Yes, I know the check isn't a perfect solution and my hardcore developer heart says to just close this issue as "you break it, your fault", but in the end I can understand the problem and the check would not be overly complex. So I could live with implementing that and then closing this issue.

avatar uglyeoin
uglyeoin - comment - 5 Dec 2022

@brianteeman Why can it only work some of the time?

avatar brianteeman
brianteeman - comment - 5 Dec 2022

You could create
article->category->menu
menu->category->article

You could create a new menu at any time. How do you tell existing content there could be an issue.

ETC ETC

avatar uglyeoin
uglyeoin - comment - 5 Dec 2022

Couldn't you just do the check both ways? You don't tell the content, you tell the user, much in the same way you can't save two articles with the same alias.

avatar brianteeman
brianteeman - comment - 5 Dec 2022

on a site with 5000 articles ?

avatar uglyeoin
uglyeoin - comment - 5 Dec 2022

We're back to "it's the users fault", they shouldn't have 5,000 articles :) Honestly, I have no idea if it's feasible or not. Does it currently check the article alias in that situation?

avatar brianteeman
brianteeman - comment - 5 Dec 2022

You are asking that for every article save then there is a check for a matching alias in every category and every menu item and then warning the user that this might cause a problem for them and for every menu item save a similar check is performed and the check would need to be performed every time you move or copy an article etc etc

avatar uglyeoin
uglyeoin - comment - 6 Dec 2022

I wouldn't see this as totally different to when a new article is created already. I would expect menu items usually to be considerably less than 5,000 even if there are 5,000 articles on a website. The same with categories, surely the article check would be more burdensome. And I wouldn't warn a user that it might cause a problem, only if it would.

avatar brianteeman
brianteeman - comment - 6 Dec 2022

I have expressed my view - without code any further discussion (at least from me) is pointless

avatar Hackwar Hackwar - change - 22 Feb 2023
Labels Added: No Code Attached Yet bug
Removed: ?
avatar Hackwar Hackwar - labeled - 22 Feb 2023

Add a Comment

Login with GitHub to post a comment