Error with Research after updatinf from 7.10 to 7.12.10

Hi everyone,

I updated SuiteCRM using the upgrade wizard from 7.10 to 7.12.10 version, everything went well but now, I noticed that there is an error when I use the Search bar of the CRM. I have checked the logs but I’m not sure to understand what to do. Here are the logs I get after a research :

Any idea ? Thank you in advance for your time.

Appears to be the same issue as this one

but there doesn’t seem to be a solution there (yet), I am afraid…

This is quite critical and that means that users of 7.10 or 7.11 can’t upgrade to 7.12, thus missing a lot of security fixes.

The other post has an interesting bit of information: this seems to happen when searching in a module which is indexed, but has no items there yet. Simple workaround, I suppose, would be to create a dummy record in those modules…

But the main thing would be to use that insight to find the root cause and fix it…

In lib/Search/SearchResults.php, the getRelatedId function is defined as

protected function getRelatedId(SugarBean $obj, string $idName, string $link): string

It is supposed to return a string but it returns null in some cases, making the search crash…

The following looks like it fixes the problem.
At the end of the function, add:

if(!$relId) {
$relId =‘’;
}

before return $relId;

1 Like

We created a PR: Fix issue #9516 by QuickCRM · Pull Request #9983 · salesagility/SuiteCRM · GitHub

1 Like