No Code Attached Yet bug
avatar ceford
ceford
16 Oct 2020

Steps to reproduce the issue

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

Expected result

The Cats Article

Actual result

A 404 Not Found page

System information (as much as possible)

I am working with a github fork and clone set up for testing - updated this morning.

Additional comments

Changed menu item to Single Article / Cats and my Home page article links work normally.

Votes

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

avatar ceford ceford - open - 16 Oct 2020
avatar joomla-cms-bot joomla-cms-bot - labeled - 16 Oct 2020
avatar ceford ceford - change - 16 Oct 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-10-16 10:01:45
Closed_By ceford
avatar ceford ceford - close - 16 Oct 2020
avatar ceford ceford - change - 16 Oct 2020
The description was changed
avatar ceford ceford - edited - 16 Oct 2020
avatar ceford ceford - change - 16 Oct 2020
Status Closed New
Closed_Date 2020-10-16 10:01:45
Closed_By ceford
avatar ceford
ceford - comment - 16 Oct 2020

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

avatar ceford ceford - reopen - 16 Oct 2020
avatar infograf768
infograf768 - comment - 16 Oct 2020

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.

avatar ceford
ceford - comment - 16 Oct 2020

I was following the instructions in #31098

This is the menu item edit form:

image

This is part of the Home page:

image

And this is what happens when I click the Cats Title link:

image

All cropped images.

avatar ceford
ceford - comment - 16 Oct 2020

Same error when I click the Dogs Title link

avatar infograf768
infograf768 - comment - 16 Oct 2020

@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?

avatar infograf768
infograf768 - comment - 16 Oct 2020

OK, I could replicate. It is independent from the alias.
You have to choose root as Top Level category to be able to display the Uncategorised categories items.
Alas, the tip was taken off in J4 but in J3, it is very clear:

Screen Shot 2020-10-16 at 18 30 09

I guess we should add the tip back.
Not a bug.

avatar infograf768
infograf768 - comment - 16 Oct 2020

We would have

Screen Shot 2020-10-16 at 18 39 18

avatar brianteeman
brianteeman - comment - 16 Oct 2020

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

avatar infograf768
infograf768 - comment - 16 Oct 2020

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"

avatar ceford
ceford - comment - 16 Oct 2020

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.

avatar brianteeman
brianteeman - comment - 16 Oct 2020

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

avatar ceford
ceford - comment - 16 Oct 2020

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.

avatar brianteeman
brianteeman - comment - 16 Oct 2020

. You are right.

;)

avatar ceford
ceford - comment - 16 Oct 2020

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.
image
If I go back and select Root my Bunkum links shows just top level categories:
image
So what exactly is List All Categories supposed to show? (Rhetorical question)

avatar infograf768
infograf768 - comment - 17 Oct 2020

Have you set the menu item parameter to display subcategories?
Screen Shot 2020-10-17 at 08 12 23

Categories:

Screen Shot 2020-10-17 at 08 15 36

If yes and we are in the same configuration as you first had (I did not add any article in the subcategory), the menu item will show.

Screen Shot 2020-10-17 at 08 16 22

and when root is chosen

allcategories_subroot

avatar adj9
adj9 - comment - 17 Oct 2020

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.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31110.

avatar roebba
roebba - comment - 27 Sep 2021

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:

  • It does not happens when i am not using 'Search Engine Friendly URLs'
  • If i use SEF URL's it happens with all articles but from only one specific category, not others!
  • If I change the category from this "trouble category" the article shows up as expected
  • If i change back to this "trouble category" the article want show and result in a 404.

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.)

  • If I click the menu item called "Trouble" to list sub categories in "trouble category" I get a white page - good... there is no sub-categories. So that works.
  • If I unpublish the menu-item called "Trouble" then the whole site work as expected. Meaning I can from the Raxo front end module click an article from the "trouble category" and it displays nicely....

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

avatar Hackwar Hackwar - change - 20 Feb 2023
Labels Added: No Code Attached Yet bug
Removed: ?
avatar Hackwar Hackwar - labeled - 20 Feb 2023
avatar Hackwar
Hackwar - comment - 19 Aug 2024

A lot of these issues should be fixed with 5.2.0.

Add a Comment

Login with GitHub to post a comment