-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unreliable search results in in 7.12 with basic and lucene search #9399
Comments
Seems duplicate with |
Looks to be, will leave this open for now to ensure specific cases are tested. |
This issue has been mentioned on SuiteCRM. There might be relevant details there: |
I'm having trouble with replicating some of your issues. I have been able to partly replicate the Search Issue: I was only able to do this on data that existed Pre-upgrade, while using PHP 7.4.3 So, I have some questions around this, that might help clarify some steps to replicate this issue easier:
Any of the above questions that you can answer would be very greatly appreciated, and should help us get closer to narrowing this down (Also, any further pertinent information such as Screenshots/Steps to replicate would also help greatly) Thanks! |
Hi @johnM2401 thanks for your response and sorry for the late reply.
I just checked and basic search returns no results at all while Lucene seems to return only post-upgrade data
DEFAULT_COLLATION_NAME shows as utf8_general_ci
I don't know, the server is currently running php 7.4.3 on Ubuntu. If necessary, I can clone the VM and upgrade.
Interestingly, I do with basic search. Not with Lucene.
I'm not sure I understand your question. If you have any further questions, I'm glad to help. Best Regards |
The first thing I would check, for this Issue, is if the search string is reaching the Lucene search code unchanged by our over-zealous string clean-ups. |
For the basic search I think I can give some pointers what happens, after couple of hours of debugging. With 7.11.19 the AntiXSS library was added. This does internally a UTF8 Decomposition (https://en.wikipedia.org/wiki/Unicode_equivalence). Now when doing a normal sql query with In our case we converted all our tables to When doing the query My quickfix at the moment was editing the //field is not last name or this is not from global unified search, so do normal where clause
$where .= $db_field . " like " . $this->seed->db->quoted(sql_like_string($field_value, $like_char));
$normalized_value = Normalizer::normalize($field_value, Normalizer::NFC);
if ($normalized_value !== $field_value) {
$where .= ' OR ' . $db_field . " like " . $this->seed->db->quoted(sql_like_string($normalized_value, $like_char));
} I'm aware that this only fixes searches where the like operator is used and not for other cases which are handled in |
Thanks for this. Where exactly is the AntiXSS library intervening in this request? Why are we doing an XSS clean-up of strings that are meant for the database, not for HTML output? |
For me the issue is fixed, with 7.12.3 as #9191 landed yesterday. So @SupersonicWaffle should test it as well, to verify he had the same issue as me. @pgorod It happens while "autoload", see #9191 (comment) |
That's great news. |
@SupersonicWaffle you should note there is known critical issue with the utf8 fix script, #9482 the we are currently addressing |
Hey @mattlorimer It seems that issue is resolved? Can you confirm it should be safe to update now? |
yes it should be safe to upgrade and use the utf8 fix now |
Search results in 7.12 seem to be unreliable but I can't quite make out a pattern.
I was advised by @Mac-Rae to create an issue over at the community forums as he can confirm problems with search seem to exist in 7.12
Issue
Some examples of unreliable results include
Expected Behavior
Search results prior to 7.12 have been more reliable
Actual Behavior
Search results don't include actual matches
Steps to Reproduce
Use basic or advanced search
Context
Users are reporting that having an unreliable search is making work very difficult
Your Environment
The text was updated successfully, but these errors were encountered: