Use search to find a result containing "Mill" with double "L'
Result page should show "Mill" in the title with double "L"
The actual result shows "Mil" with only one "L"
Joomla 3.9.28
PHP 7.4
MySql 5.7
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.
Further troubleshooting has made things more clear. Any title containing an apostrophe, gets the last character of the title stripped in search results.
Note: WE have been able to replicate the Apostrophe - Cutoff issue on a clean Joomla 3.9.28 installation:
Labels |
Added:
?
|
Thanks for checking in. Just tested on clean 3.9.28 - apostrophe search result title cutoff issue remains.
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
This is for the original search and not finder aka smart search. It was finder that has recent bug fixes.
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.
Correct: the issues occur in the original search.
The question for me is: Why do we strip accents here before the lengths are calculated?:
https://github.com/joomla/joomla-cms/blob/3.9.28/administrator/components/com_search/helpers/search.php#L285
and
https://github.com/joomla/joomla-cms/blob/3.9.28/administrator/components/com_search/helpers/search.php#L287
This is for the original search and not finder aka smart search. It was finder that has recent bug fixes.
Can we move this to the com_search repository?
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.
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...
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
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: ? |
Really 3.9.26? If so, please update to 3.9.28 and check again. IIRC this has been fixed.