SuiteCRM 7.8.31 searches do not work

I am still working on successfully upgrading from SugarCRM 6.5.17 to SuiteCRM and doing this on a copy in a controlled docker environment before copying to the final server. The OS is CentOS 7.

  • SugarCRM has been running on CentOS 6, php 5.3.3 and MySQL 5.1.71.
  • The first docker upgrade used CentOS 7, php 5.4.16 and MariaDB 10.1 which should be OK according to the upgrade matrix to upgrade to SuiteCRM 7.6.6. This seemed to work fine.
  • I then upgraded php to 7.0 and then ran the upgrade wizard to 7.8.31.

I can now send/receive e-mails but two things are not - yet - working:

  • For some reason I cannot search contacts/accounts etc and all searches end empty although I can find the contacts/accounts.
  • I have not gotten cron to run despite making sure to run it as user apache. I can force it to run using the “runuser” command in CentOS 7 but it does not run automatically.

Could someone point me in the right direction to get the above working? Thank you.

Have you seen this?

Most of it, yes. Are you saying that the reason I cannot find anything when I search is because the indexing has not been run after upgrading? Looking at the Scheduler tasks in the Admin tab, would this be the “Perform Lucene Index” which only runs on the hour?

It depends on whether you enabled that search in Admin / AOD Settings.

But any way, definitely the route for you to take is to fix any problems with Scheduler jobs (and permissions!) and then check if search is operational.

If you have a broken Lucene index you might need to reindex.

You might have further clues in one of your two logs.

Ok. I discovered that running crond in the background is not really workable in docker which presumably is the reason that my cron jobs are not running as scheduled. I can, however, force individual runs using the command runuser and it runs the scheduled cron jobs. The two indexing schedulers you mention, however, are only run on the hour so I had to trick the system in running them. It is still running the AOD indexing job which had never been run before, nor had the Lucene index job. Waiting for them to finish to see if this was the reason my searches were empty.

However, I can see that en error message from the indexing job that I presumably ought to address:

PHP Notice: iconv(): Detected an illegal character in input string in /var/www/html/crm/modules/AOD_Index/Lib/Zend/Search/Lucene/Analysis/Analyzer/Common/Utf8Num.php on line 77

This occurs many times and am suspecting this has something to do with different character set somewhere in a database table??

What do I need to correct in the database to fix this since this does not look promising?

Great, after indexing (Lucene indexing I believe) I can now search. cronjobs not running at the appointed time is a docker issue so we can ignore that.

I would, however, like to fix the php error I mentioned in my previous message. Do you have any ideas?

One more thing, which scheduling job pulls in e-mail for group e-mailboxes? That does not seem to have occurred?

That also works now, it seems it only pulls in e-mails which have an unread status which is fine.

I do see the following php notices when the cron scheduler is run:
PHP Notice: Undefined property: User::$team_set_id in /var/www/html/crm/modules/Schedulers/_AddJobsHere.php on line 100
PHP Notice: Undefined property: stdClass::$parts in /var/www/html/crm/modules/InboundEmail/InboundEmail.php on line 3305
PHP Notice: Undefined property: stdClass::$parts in /var/www/html/crm/modules/InboundEmail/InboundEmail.php on line 3305
PHP Notice: Trying to get property of non-object in /var/www/html/crm/modules/InboundEmail/InboundEmail.php on line 3799
PHP Notice: Trying to get property of non-object in /var/www/html/crm/modules/InboundEmail/InboundEmail.php on line 3823
PHP Notice: Undefined property: stdClass::$disposition in /var/www/html/crm/modules/InboundEmail/InboundEmail.php on line 3824
PHP Notice: Undefined property: stdClass::$parts in /var/www/html/crm/modules/InboundEmail/InboundEmail.php on line 3305
PHP Notice: Undefined property: stdClass::$parts in /var/www/html/crm/modules/InboundEmail/InboundEmail.php on line 3305
PHP Notice: Undefined offset: 1 in /var/www/html/crm/modules/InboundEmail/InboundEmail.php on line 3414

How can I fix them? My philosophy is that there should not be any errors or warnings.

You can’t get rid of all messages in SuiteCRM - that’s too big a task. But you’re right to pay attention to errors and warnings, just not to “notices” which are the lower level that these messages have.

You should just turn off their on-screen display (display_errors in php.ini).

Ok but should I be concerned about the php notice

PHP Notice: iconv(): Detected an illegal character in input string in /var/www/html/crm/modules/AOD_Index/Lib/Zend/Search/Lucene/Analysis/Analyzer/Common/Utf8Num.php on line 77

which occurred while it was indexing? I am concerned there might be some character set anomaly in a table that transferred from SugarCRM 6.5.17 and now SuiteCRM 7.8.31. I have a lot of non-ASCII characters in the old database.

I have no idea, you’ll have to try some tests to figure out which character might be causing that, and whether it is a real problem or not…