No Code Attached Yet
avatar DSist
DSist
5 May 2023

Steps to reproduce the issue

Highlight Search Terms parameter = Yes. The issue can be reproduced with a specific search provided there is no space right after the term in the text. It does not matter what comes after the term: a punctuation mark or a latter (if the search term is a part of a bigger word), the term is not highlighted.

Expected result

Green color - search terms highlighted correctly with mark data-markjs="true", there is a space right after all the terms.

Actual result

Red color - missing highlights because there is a dot right after the terms, not space.

search_bug2_1

System information (as much as possible)

Joomla 4.3.1 native search
PHP 8.0.3

Additional comments

The issue has been there from the very beginning of Joomla 4.

avatar DSist DSist - open - 5 May 2023
avatar joomla-cms-bot joomla-cms-bot - change - 5 May 2023
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 5 May 2023
avatar DSist DSist - change - 5 May 2023
The description was changed
avatar DSist DSist - edited - 5 May 2023
avatar DSist DSist - change - 5 May 2023
The description was changed
avatar DSist DSist - edited - 5 May 2023
avatar DSist DSist - change - 5 May 2023
The description was changed
avatar DSist DSist - edited - 5 May 2023
avatar DSist DSist - change - 5 May 2023
Title
Sometimes not all the search terms are highlighted in the search results
The search term is not highlighted in the search results if there is no space after the term
avatar DSist DSist - edited - 5 May 2023
avatar DSist DSist - change - 5 May 2023
The description was changed
avatar DSist DSist - edited - 5 May 2023
avatar DSist DSist - change - 5 May 2023
Title
The search term is not highlighted in the search results if there is no space after the term
The search term is not highlighted in the search results if there is no space right after the term
avatar DSist DSist - edited - 5 May 2023
avatar DSist DSist - change - 5 May 2023
The description was changed
avatar DSist DSist - edited - 5 May 2023
avatar DSist DSist - change - 5 May 2023
The description was changed
avatar DSist DSist - edited - 5 May 2023
avatar DSist DSist - change - 5 May 2023
The description was changed
avatar DSist DSist - edited - 5 May 2023
avatar DSist DSist - change - 5 May 2023
Title
The search term is not highlighted in the search results if there is no space right after the term
The search term is not highlighted in the search results if there is no space right after the term in the text
avatar DSist DSist - edited - 5 May 2023
avatar DSist DSist - change - 5 May 2023
The description was changed
avatar DSist DSist - edited - 5 May 2023
avatar brianteeman
brianteeman - comment - 6 May 2023

Confirmed

avatar hans2103
hans2103 - comment - 12 May 2023

Confirmed
Highlight.js was added via #33089
Highlight.js was built upon mark.js
Looking at an example of mark.js I see that finding amet even highlights the search word followed by comma or dot.
https://jsfiddle.net/julmot/vpav6tL1/

so ... something in our Joomla code breaks the feature mark.js already provides.


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

avatar hans2103
hans2103 - comment - 12 May 2023

Issue started by merging the solution for #38908

I'll create a PR te revert that commit and solve the issue using CSS.


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

avatar richard67 richard67 - close - 12 May 2023
avatar richard67
richard67 - comment - 12 May 2023

Closing as having a pull request. Please test #40576

avatar richard67 richard67 - change - 12 May 2023
Status New Closed
Closed_Date 0000-00-00 00:00:00 2023-05-12 12:40:37
Closed_By richard67

Add a Comment

Login with GitHub to post a comment