This morning I was testing a pull request. This is what I did:
Create three uncategorised articles. Two of them marked Featured. Articles are Cats, Dogs and Mice. First and last are featured.
Quote: 'Create a menu link (list all categories) to an article.' I created Cats / List All Categories / Uncategorised.
The Home page shows two articles: Cats and Mice.
Click Cats
The Cats Article
A 404 Not Found page
I am working with a github fork and clone set up for testing - updated this morning.
Changed menu item to Single Article / Cats and my Home page article links work normally.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-10-16 10:01:45 |
Closed_By | ⇒ | ceford |
Status | Closed | ⇒ | New |
Closed_Date | 2020-10-16 10:01:45 | ⇒ | |
Closed_By | ceford | ⇒ |
Quote: 'Create a menu link (list all categories) to an article.' I created Cats / List All Categories / Uncategorised.
Not sure I understand. Please add screenshots.
Same error when I click the Dogs Title link
@ceford
I am still confused.
What kind of Home menu item do you have: a "Featured Articles" menu item?
If yes, have you added another menu item as you posted above? With the same alias as one of your articles?
Is this one on the same level as your Home menu item? Is it a child of it?
Jeez its obvious that if you chose an option called List all categories then you have to select a top level category that has categories inside it. But that is NOT the problem here!!
You should never ever be able to build content in joomla that results in a 404 error when you click on it that is a BUG in code not a misunderstanding of an option. A misunderstanding of an option will mean it doesnt do wht you thought it would do. This is an error
Jeez its obvious that if you chose an option called List all categories then you have to select a top level category that has categories inside it.
Jeeeeeeez, it is not so obvious... Top Level category could mean it is included as well as subs as you can see here. The wording in any language does not say the top level category is NOT included.
Even if there is a bug, we should not delete tips so happily.
Patch is here:
#31115
I leave this PR open if one wishes to solve the "bug"
A little more investigation:
Home menu item is a Featured Articles type, url: http://localhost/joomla-cms-4/index.php Marked as Default in Home column. With no other published menu items: Clicking on Cats gives the Cats article with this in the breadcrumbs: You are here: Home / Uncategorised / Cats And this as its url: http://localhost/joomla-cms-4/index.php?view=article&id=1:cats&catid=2 Clicking on Uncategorised gives Uncategorised and then both Cats and Dogs articles with url: http://localhost/joomla-cms-4/index.php?view=category&id=2 With another menu item published, named Bunkum, single article pointing to Dogs Home page links are: Cats: http://localhost/joomla-cms-4/index.php?view=article&id=1:cats&catid=2 Dogs: http://localhost/joomla-cms-4/index.php/bunkum That all looks normal and works normally All link types work normally except List All Categories / Uncategorised with urls: Cats: http://localhost/joomla-cms-4/index.php/bunkum/1-cats Dogs: http://localhost/joomla-cms-4/index.php/bunkum/2-dogs Both lead to 404 Not Found
So this is a bug! I think we need to prevent selection of Uncategorised OR fix the route if it is selected.
99% selecting uncategorised is a red herring
Repeat the above situation but with a category called animals
I am confident the problem will still exist
I created an Animals category, changed menu item Bunkum to select that as a top level category. My Home page links to Cats and to Dogs work normally. Have I missed something? The problem still only exists with Uncategorised.
Edit: I see - I set to Dogs to be in category Animals and it results in a 404 too. You are right.
. You are right.
;)
I created a subcategory of Animals named Ants and one article in this category. My Bunkum menu item now leads to a page with that Article. No sign of my Dogs article.
If I go back and select Root my Bunkum links shows just top level categories:
So what exactly is List All Categories supposed to show? (Rhetorical question)
I'm on the latest Nightly Builds.
I have done the initial steps: I create list of categories, related articles.
The number of articles is correct
For the sub-categories I have no problems.
I think this issue/bug is deeper founded than whats carved out above here.
I am getting the exact same resulting in a 404, with the same errors on the call stack here, same functions and locations.
I tracked it down to:
I looked further into it from the admin-frontend:
(My site is a dev-site, so i only have one menu item which is named "Trouble", supposed to "List All Categories in an Article Category Tree" AND the selected category is the above mentioned "trouble category". So this menu item is supposed to list all sub-categories to the "trouble category" - if i am not wrong? Further on I use a site module from Raxo on the front to show articles in a nice grid.)
I hope this should give a clue for what to look for.
There is obviously something buggy in the Joomla 4 code at this spesific point...
Cheers
Labels |
Added:
No Code Attached Yet
bug
Removed: ? |
A lot of these issues should be fixed with 5.2.0.
Seems to be a router problem, first line of call stack: JROOT/libraries/src/Router/Router.php:153
URL bar: http://localhost/joomla-cms-4/index.php/cats/1-cats