No Code Attached Yet
avatar pnutster
pnutster
6 Jul 2021

Steps to reproduce the issue

Use search to find a result containing "Mill" with double "L'

Expected result

Result page should show "Mill" in the title with double "L"

Actual result

The actual result shows "Mil" with only one "L"

System information (as much as possible)

Joomla 3.9.28
PHP 7.4
MySql 5.7

Additional comments

We have been able to locate the issue to be in the _smartSubstr function in /administrator/components/com_search/helpers/SearchHelper.php file

We have been able to hardcode this file to fix our issue (yes, sorry), but of-course any update to the Joomla core will wipe this out. Hopefully the stripping issue can be looked at.

I have attached an image of the site where we have encountered the issue. Showing "Mil" where it should show "Mill" - characters are being stripped.

image

Further troubleshooting has made things more clear. Any title containing an apostrophe, gets the last character of the title stripped in search results.

See attached Screenshot:
Screen-Shot-2021-07-06-13-48-02

Note: WE have been able to replicate the Apostrophe - Cutoff issue on a clean Joomla 3.9.28 installation:

Screen-Shot-2021-07-06-14-12-47

avatar pnutster pnutster - open - 6 Jul 2021
avatar joomla-cms-bot joomla-cms-bot - change - 6 Jul 2021
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 6 Jul 2021
avatar pnutster pnutster - change - 6 Jul 2021
The description was changed
avatar pnutster pnutster - edited - 6 Jul 2021
avatar richard67
richard67 - comment - 6 Jul 2021

Really 3.9.26? If so, please update to 3.9.28 and check again. IIRC this has been fixed.

avatar pnutster pnutster - change - 6 Jul 2021
The description was changed
avatar pnutster pnutster - edited - 6 Jul 2021
avatar pnutster
pnutster - comment - 6 Jul 2021

Thanks for checking in. Just tested on clean 3.9.28 - apostrophe search result title cutoff issue remains.

avatar pnutster pnutster - change - 6 Jul 2021
The description was changed
avatar pnutster pnutster - edited - 6 Jul 2021
avatar richard67
richard67 - comment - 6 Jul 2021

Thanks for reporting back.

@Hackwar Any idea?

avatar pnutster
pnutster - comment - 6 Jul 2021

One comment that one of our programmers made:

the smart replacement search i think filters out the appostrophe and when it rebuilds the string its 1 character shorter than it should be

avatar brianteeman
brianteeman - comment - 6 Jul 2021

This is for the original search and not finder aka smart search. It was finder that has recent bug fixes.

avatar richard67
richard67 - comment - 6 Jul 2021

This is for the original search and not finder aka smart search. It was finder that has recent bug fixes.

Ouch ... again I mixed that up. Thanks for the hint.

avatar pnutster
pnutster - comment - 6 Jul 2021

Correct: the issues occur in the original search.

avatar farimas
farimas - comment - 12 Jul 2021

This is for the original search and not finder aka smart search. It was finder that has recent bug fixes.


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

avatar richard67
richard67 - comment - 12 Jul 2021

@farimas We don't accept posting spam links here.

avatar Hackwar
Hackwar - comment - 17 Jan 2022

Can we move this to the com_search repository?

avatar zero-24
zero-24 - comment - 17 Jan 2022

Moving issues between orgs (joomla vs joomla-extensions) does not look like to be possible you can only move issues within on org to a different repo. I would recommend closing here and create a new issue there that links back here for history.

avatar richard67
richard67 - comment - 17 Jan 2022

@Hackwar I just see this issue here is for 3.x where search is part of the core. Should we really move this to the search repository?

avatar Hackwar
Hackwar - comment - 17 Jan 2022

To be honest, I would consider this a wontfix for 3.x and only fix it in the 4.0 version in the standalone repo. However I don't even know what the functions/methods involved here are supposed to do. I'm not sure why we can't simply use htmlspecialchars() or something similar...

avatar brianteeman
brianteeman - comment - 26 Aug 2022

Thank you for raising this issue.

Joomla 3 is now in security only mode with no further bug fixes or new features.

As this issue doesn't relate to Joomla 4 it will now been closed.

If we are mistaken and this does apply to Joomla 4 please open a new issue (and reference this one if you wish) with updated details for testing in Joomla 4.
cc @zero-24

avatar Quy Quy - change - 26 Aug 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-08-26 22:54:17
Closed_By Quy
Labels Added: No Code Attached Yet
Removed: ?
avatar Quy Quy - close - 26 Aug 2022

Add a Comment

Login with GitHub to post a comment