No Code Attached Yet bug
avatar dautrich
dautrich
26 Feb 2024

Steps to reproduce the issue

  1. Go to URL https://www.systemtest.neudorf-mkk.de/
  2. Click on "Suchen" in the top horizontal navigation
  3. Enter "joomla 4" in the search field and click button "Suchen"
  4. Click on any of the results

Expected result

The respective page of the website is displayed.

Actual result

  1. An extremely long URL is created (s. the browser's status bar):

grafik

  1. You get an HTML error 414 ("Request-URI too lond")

grafik

System information (as much as possible)

Joomla 5.0.3
PHP 8.2.2
MySQL 8.0.33

Additional comments

  1. When searching for "joomla" or "joomla version" or "joomla 51", everything works fine. So the issue seems to be related to the digit (or string?) 4 in the search field.
  2. The testsite is not really small, but contains more than 1.200 articles with several access levels.
  3. I've not been able to reproduce the issue on a small test site (https://www.current.rolfdautrich.de, search for "joomla 5").
avatar dautrich dautrich - open - 26 Feb 2024
avatar joomla-cms-bot joomla-cms-bot - change - 26 Feb 2024
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 26 Feb 2024
avatar dautrich dautrich - change - 26 Feb 2024
The description was changed
avatar dautrich dautrich - edited - 26 Feb 2024
avatar dautrich dautrich - change - 26 Feb 2024
The description was changed
avatar dautrich dautrich - edited - 26 Feb 2024
avatar dautrich dautrich - change - 26 Feb 2024
The description was changed
avatar dautrich dautrich - edited - 26 Feb 2024
avatar dautrich dautrich - change - 26 Feb 2024
The description was changed
avatar dautrich dautrich - edited - 26 Feb 2024
avatar dautrich dautrich - change - 26 Feb 2024
The description was changed
avatar dautrich dautrich - edited - 26 Feb 2024
avatar brianteeman
brianteeman - comment - 26 Feb 2024

the long string in the url is a base64 decoded string of the terms to highlight on the page.

avatar dautrich
dautrich - comment - 26 Feb 2024

@brianteeman
Do you have an idea why "joomla 4" produces such a long string, while "joomla 51" makes a relatively short one?

avatar Fedik
Fedik - comment - 29 Feb 2024

Change Smart Serach configuration. Change "Word Match" to "Match exactly".

avatar Fedik
Fedik - comment - 29 Feb 2024

It happens because you have set "Word Match" to "Match words containing the search term anywhere".
And this produce huge result while searching for 4

} elseif ($this->wordmode === 'fuzzy') {
$searchTerm = '%' . $searchTerm . '%';
$searchStem = '%' . $searchStem . '%';
$query->where('(' . $term . ' LIKE :searchTerm OR ' . $stem . ' LIKE :searchStem)');
} else {

avatar Fedik Fedik - change - 29 Feb 2024
Labels Added: bug
avatar Fedik Fedik - labeled - 29 Feb 2024
avatar Fedik
Fedik - comment - 29 Feb 2024

I set it as a bug, we at least should limit the number of terms to highlighting.
Similar to what Hannes already made for JS #41463

avatar Fedik
Fedik - comment - 29 Feb 2024

Please test #42921

avatar Fedik Fedik - change - 29 Feb 2024
Status New Closed
Closed_Date 0000-00-00 00:00:00 2024-02-29 10:52:46
Closed_By Fedik
avatar Fedik Fedik - close - 29 Feb 2024
avatar dautrich
dautrich - comment - 29 Feb 2024

The issue was filed for J5.0, but the resulting PR #42921 is for J4.4, as of the headline. Does it apply to J5.0 as well?

avatar Fedik
Fedik - comment - 29 Feb 2024

The bug affects both 4.x and 5.x,
After fixing 4.x it will be upmerged to 5.x

avatar dautrich
dautrich - comment - 29 Feb 2024

@Fedik

Under J4.4, the behaviour is different from what I've seen in J5.0:

Without or with the patch applied:

  • I see a JS error in devtools

grafik

  • I get a result list and can select the found article, which opens correctly. No sign of extra-long URIs.

Under 5.0, I get the error described above.

avatar Fedik
Fedik - comment - 29 Feb 2024

I think you have a different configuration for Smart search for j4 and j5.

The error will not happen on default installation, with default parameters.
Only when you change them. Check my previous comments (#42889 (comment)), or the description in the linked PR.

avatar dautrich
dautrich - comment - 29 Feb 2024

I have set the Smart Search configuration as described in your testing instructions. And "Word Match" is set to exactly this option on my faulty site.

avatar Fedik
Fedik - comment - 29 Feb 2024

Another reason that your test installation for j4 has less amount of content than my.

Add a Comment

Login with GitHub to post a comment