?
avatar PhilETaylor
PhilETaylor
7 Oct 2020

Steps to reproduce the issue

Forked from issue: #30967

Set up is as per the above issue

Note in the db I have three categories after installing the sample data

Uncategorised = ID 2
Blog = ID 8
Help = ID 9

Look at the search results ...

Screenshot 2020-10-07 at 01 45 48

Expected result

No invalid links to invalid categories in the search results that when clicked give 404 errors

Actual result

404 errors

http://127.0.0.1:4444/index.php?view=category&id=7

http://127.0.0.1:4444/index.php?view=category&id=3

Screenshot 2020-10-07 at 01 55 48

System information (as much as possible)

Additional comments

avatar PhilETaylor PhilETaylor - open - 7 Oct 2020
avatar joomla-cms-bot joomla-cms-bot - change - 7 Oct 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 7 Oct 2020
avatar PhilETaylor PhilETaylor - change - 7 Oct 2020
The description was changed
avatar PhilETaylor PhilETaylor - edited - 7 Oct 2020
avatar Hackwar
Hackwar - comment - 9 Oct 2020

This isn't an issue of Smart Search, but of the routing. There simply is no menu route to the mentioned categories and thus it falls back on the home menuitem. That then again results in a 404 URL. Don't know how to fix this yet, but marking it as a com_finder/Smart Search issue is missing the point.

avatar PhilETaylor
PhilETaylor - comment - 9 Oct 2020

You missed the point ...

These are the ONLY categories in my site:

Uncategorised = ID 2
Blog = ID 8
Help = ID 9

Yet in the search results there are links to categories with id 7 and 3

All I have done is install Joomla 4 and Sample Blog Data and then Index the site. THE CATEGORIES with id 7 and 3 DO NOT EXIST and therefore these categories should never be in the Index...

avatar gostn
gostn - comment - 10 Oct 2020

Screen Shot 2020-10-10 at 06 48 10

avatar infograf768
infograf768 - comment - 10 Oct 2020

@PhilETaylor
if you display administrator/index.php?option=com_finder&view=index and filter by category, do you find your ids?
Likely Uncategorised for users, banners, or newsfeeds I guess.

avatar PhilETaylor
PhilETaylor - comment - 10 Oct 2020

I was reading the MySQL table directly

I'll try again today

avatar PhilETaylor
PhilETaylor - comment - 10 Oct 2020

@gostn You have obviously not followed the steps to replicate the bug FROM A CLEAN SLATE as the "Blog Sample Data" doesn't install other languages.

@infograf768 I have checked the database direct again today - and there many more categories than the three I saw the other night :-(

Screenshot 2020-10-10 at 11 15 14

After INDEXING the "Blog Sample Data" right after installing it you get this:

Screenshot 2020-10-10 at 11 12 15

Then on the frontend (using the bug in #30967) you see:

Screenshot 2020-10-10 at 11 15 47

So the BUG here is that the links are missing the option=com_XXX param in the URLS.

For example, using the screenshots above you can see the 7 is com_users, and option=com_users is missing in the URL of the first search result http://127.0.0.1:4444/index.php?view=category&id=7

However even if I add that suffix I then get a 404 at http://127.0.0.1:4444/index.php?view=category&id=7&option=com_users

avatar gostn
gostn - comment - 10 Oct 2020

You have obviously not followed the steps to replicate the bug FROM A CLEAN SLATE as the "Blog Sample Data" doesn't install other languages.

thats why i filter languages to ´all´.

avatar PhilETaylor
PhilETaylor - comment - 10 Oct 2020

The only way to test something is from a clean slate and then following the "steps to reproduce" provided.

Working on a site with changes already can cause all kinds of side-issues. Maybe not in this case on this issue, but it will trip you up more times than you will want to admit. Always start from a clean known state :)

avatar gostn
gostn - comment - 10 Oct 2020

Working on a site with changes already

the "changes":

image

avatar infograf768
infograf768 - comment - 10 Oct 2020

There is a bug indeed

So the BUG here is that the links are missing the option=com_XXX param in the URLS.

Correct. And I also wonder why you get these results when searching for PhilTaylor

avatar PhilETaylor
PhilETaylor - comment - 10 Oct 2020

@gostn Yes but the steps published to reproduce say to use the "Blog Sample Data" and not the "Multilingual Sample Data" - for this issue it made no difference, but in future it might

@infograf768 Maybe its all related to the parent issue this forked from - maybe I should never see these results if the bug #30967 was fixed?

avatar gostn
gostn - comment - 10 Oct 2020

Yes but the steps published to reproduce say to use the "Blog Sample Data" and not the "Multilingual Sample Data

i used both as always so what.

avatar PhilETaylor
PhilETaylor - comment - 10 Oct 2020

You can do what ever you want... all I am saying is that the correct way to test is from a known clean state, and that is to follow the "Steps to reproduce"... this time you got away with it, that might not always be the case :) Up to you though.

avatar Hackwar
Hackwar - comment - 10 Oct 2020

@PhilETaylor I did understand you correctly and I followed your instructions. As you noticed yourself, there are more categories in your site than those 2 that you saw. I assumed that it is a problem of the router and not the search. When enabling SEF URLs, the router tries to somehow connect the URL to a menu item. If that fails, it falls back on the home menu item. URL query parameters, which are already given by the menu item, are removed. In your case that is the &option=com_content, which leaves the &view=category&id=7.

However on deeper inspection, it is an issue of the categories indexing plugin. The plugin was indexing categories for components without a frontend view for them, thus without anything to display. Someone thought it might be a good idea to simply fall back on the com_content RouteHelper. So the given URL was index.php?option=com_content&view=category&id=7, while it actually should have been for com_users, which doesn't have a frontend category view and thus this category shouldn't even be indexed at all.

The fix for this is in #31041

avatar PhilETaylor PhilETaylor - change - 10 Oct 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-10-10 18:59:51
Closed_By PhilETaylor
avatar PhilETaylor PhilETaylor - close - 10 Oct 2020

Add a Comment

Login with GitHub to post a comment