After update to 7.13., email client causing database error

Updated 7.12.4 → 7.13

Email client not showing mailbox, but:

image

From suitecrm.log:

Wed Dec 21 10:14:56 2022 [30384][1][FATAL] Mysqli_query failed.
Wed Dec 21 10:14:56 2022 [30384][1][FATAL] Error running count query for InboundEmail List:  Query Failed:  SELECT count(*) c FROM inbound_email   LEFT JOIN  users owner_user ON owner_user.id=inbound_email.created_by AND owner_user.deleted=0
 AND owner_user.deleted=0  LEFT JOIN  users distribution_user ON inbound_email.distribution_user_id=distribution_user.id AND distribution_user.deleted=0

 AND distribution_user.deleted=0  LEFT JOIN  outbound_email outbound_email ON inbound_email.outbound_email_id=outbound_email.id AND outbound_email.deleted=0

 AND outbound_email.deleted=0  LEFT JOIN  email_templates email_templates ON inbound_email.template_id=email_templates.id AND email_templates.deleted=0

 AND email_templates.deleted=0  LEFT JOIN  external_oauth_connections external_oauth_connections ON inbound_email.external_oauth_connection_id=external_oauth_connections.id AND external_oauth_connections.deleted=0

 AND external_oauth_connections.deleted=0  LEFT JOIN  users jt6 ON jt6.id=inbound_email.created_by AND jt6.deleted=0
 AND jt6.deleted=0 where (((inbound_email.is_personal IS NULL) OR (inbound_email.is_personal = 0 ) OR (inbound_email.is_personal = 1 AND inbound_email.created_by = '1'))) AND inbound_email.deleted=0: MySQL error 1267: Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_swedish_ci,IMPLICIT) for operation '='
Wed Dec 21 10:14:56 2022 [30384][1][FATAL] Exception handling in /home/MY_PATH/include/MVC/Controller/SugarController.php:397
Wed Dec 21 10:14:56 2022 [30384][1][FATAL] Exception in Controller: Database failure. Please refer to suitecrm.log for details.

After upgrade logged out and in again and also ran quick repair and rebuild.

Had to reconfigure my inbound mail, which seems to have gone OK.
Also, from Email “Compose” I can send mail OK, but after that that returns to the view of the picture above.
Ran quick repair and rebuild again → No change

The last line in the log is somewhat amusing; this IS from suitecrm.log

:point_up: this is the relevant part.

@John has been opening a number of Issues for 7.13 email feature, maybe check Github to see if this one is already there

7.13 was released yesterday, so not much issues yet. Github seems to be a hard place to search & find anything.

What comes to “Illegal mix of collations” in database, I don’t know much of database management, but I got an impression that maybe db tables needs to be converted using same set of collations? I don’t have a clue how to do that, however.

What comes to ut8_swedish_ci, I believe that at least partially and at least in some places specify the use and existence of letters ä,ö, å, Ä, Ö and Å? Those I’m going to still need,

Unless someone has good clues how to proceed from this, I revert installation back to 7.12.4 and come back to these again maybe next Xmas.

BTW, now a bit later suitecrm.log seems to be filled with these:

...
...
Wed Dec 21 12:38:02 2022 [3][1][FATAL] Using imap handler class: ImapHandler
Wed Dec 21 12:38:03 2022 [3][1][FATAL] Using imap handler class: ImapHandler
Wed Dec 21 12:40:02 2022 [3][1][FATAL] Using imap handler class: ImapHandler
Wed Dec 21 12:40:02 2022 [3][1][FATAL] Using imap handler class: ImapHandler
Wed Dec 21 12:42:02 2022 [3][1][FATAL] Using imap handler class: ImapHandler
Wed Dec 21 12:42:02 2022 [3][1][FATAL] Using imap handler class: ImapHandler
Wed Dec 21 12:44:02 2022 [3][1][FATAL] Using imap handler class: ImapHandler
Wed Dec 21 12:44:02 2022 [3][1][FATAL] Using imap handler class: ImapHandler
Wed Dec 21 12:46:02 2022 [3][1][FATAL] Using imap handler class: ImapHandler
Wed Dec 21 12:46:02 2022 [3][1][FATAL] Using imap handler class: ImapHandler
Wed Dec 21 12:48:02 2022 [3][1][FATAL] Using imap handler class: ImapHandler
Wed Dec 21 12:48:02 2022 [3][1][FATAL] Using imap handler class: ImapHandler
Wed Dec 21 12:50:02 2022 [3][1][FATAL] Using imap handler class: ImapHandler
Wed Dec 21 12:50:02 2022 [3][1][FATAL] Using imap handler class: ImapHandler
Wed Dec 21 12:52:03 2022 [3][1][FATAL] Using imap handler class: ImapHandler
Wed Dec 21 12:52:03 2022 [3][1][FATAL] Using imap handler class: ImapHandler
Wed Dec 21 12:54:04 2022 [3][1][FATAL] Using imap handler class: ImapHandler
Wed Dec 21 12:54:04 2022 [3][1][FATAL] Using imap handler class: ImapHandler
Wed Dec 21 12:56:02 2022 [3][1][FATAL] Using imap handler class: ImapHandler
Wed Dec 21 12:56:02 2022 [3][1][FATAL] Using imap handler class: ImapHandler
Wed Dec 21 12:58:02 2022 [3][1][FATAL] Using imap handler class: ImapHandler
Wed Dec 21 12:58:02 2022 [3][1][FATAL] Using imap handler class: ImapHandler
Wed Dec 21 13:00:03 2022 [3][1][FATAL] Using imap handler class: ImapHandler
Wed Dec 21 13:00:03 2022 [3][1][FATAL] Using imap handler class: ImapHandler
Wed Dec 21 13:02:02 2022 [3][1][FATAL] Using imap handler class: ImapHandler
Wed Dec 21 13:02:02 2022 [3][1][FATAL] Using imap handler class: ImapHandler
Wed Dec 21 13:04:03 2022 [3][1][FATAL] Using imap handler class: ImapHandler
Wed Dec 21 13:04:03 2022 [3][1][FATAL] Using imap handler class: ImapHandler
Wed Dec 21 13:06:02 2022 [3][1][FATAL] Using imap handler class: ImapHandler
Wed Dec 21 13:06:02 2022 [3][1][FATAL] Using imap handler class: ImapHandler
Wed Dec 21 13:08:03 2022 [3][1][FATAL] Using imap handler class: ImapHandler
Wed Dec 21 13:08:03 2022 [3][1][FATAL] Using imap handler class: ImapHandler
Wed Dec 21 13:10:03 2022 [3][1][FATAL] Using imap handler class: ImapHandler
Wed Dec 21 13:10:03 2022 [3][1][FATAL] Using imap handler class: ImapHandler
Wed Dec 21 13:12:02 2022 [3][1][FATAL] Using imap handler class: ImapHandler
Wed Dec 21 13:12:02 2022 [3][1][FATAL] Using imap handler class: ImapHandler
Wed Dec 21 13:14:03 2022 [3][1][FATAL] Using imap handler class: ImapHandler
Wed Dec 21 13:14:03 2022 [3][1][FATAL] Using imap handler class: ImapHandler
Wed Dec 21 13:16:02 2022 [3][1][FATAL] Using imap handler class: ImapHandler
Wed Dec 21 13:16:02 2022 [3][1][FATAL] Using imap handler class: ImapHandler
Wed Dec 21 13:18:02 2022 [3][1][FATAL] Using imap handler class: ImapHandler
Wed Dec 21 13:18:02 2022 [3][1][FATAL] Using imap handler class: ImapHandler
Wed Dec 21 13:20:03 2022 [3][1][FATAL] Using imap handler class: ImapHandler
Wed Dec 21 13:20:03 2022 [3][1][FATAL] Using imap handler class: ImapHandler
Wed Dec 21 13:22:02 2022 [3][1][FATAL] Using imap handler class: ImapHandler
Wed Dec 21 13:22:02 2022 [3][1][FATAL] Using imap handler class: ImapHandler
...

They seem to occur in 2 minutes interval in pairs.
Only thing I have at 2 minutes interval is bounce handling (“Run Nightly Process Bounced Campaign Emails”) scheduled task timed with cron job.

What comes to database collation, when going to phpMyAdmin → Operations, I can see this:

image

The question is: Can I, is it safe to and should I select from here some other collation and tick that box?

utf8_swedish_ci perhaps?

Is this how it works? Could someone confirm/ advice a bit more?

EDIT: There was actually 2 checkboxes, the above for table collations and the second coming visible when going forward and it was for the columns. Checked them both and pressed “Go”

After short while I got an announcement that collations were set, after which mails came visible in email client.

Got rid of the collation related error messages in suitecrm.log as well

Still have these:

[3][1][FATAL] Using imap handler class: ImapHandler

For this I cannot find anything with Google. Probably something new that came with in 7.13… Bit worrying too, it somehow feels there is something more serious ly wrong with email habling under the hood…

(found few new error messages as well, but I save them for later posts)

There seems to be an error in the email client UI, too; usually in this kind of views columns can be sorted asc./ desc. by mouse-click, but in this module links seemed to be missing and sorting did not work for any of the columns.

Hey @promek

I’m glad you were able to resolve your issues with the DB Collation, thank you for updating us!


Regarding the error:

[3][1][FATAL] Using imap handler class: ImapHandler

I believe this isn’t a true FATAL error, (as no errors actually occur for this message to appear)

It looks to simply be logging that is set at FATAL level:


As this line just outputs the Imap Handler Class used, this should be lowered, ie: DEBUG level

I’ve raised this on our github so it can be tracked:


However, if you wish to change this yourself, you should be able to modify this line’s logging level.

By changing line 213 in
include->imap->ImapHandlerFactory.php

From:
$log->fatal('Using imap handler class: ’ . $interfaceClass);

To:
$log->debug('Using imap handler class: ’ . $interfaceClass);


This message will no longer be logged at FATAL level.

This should hopefully reduce the SuiteCRM Logs spam, until a more permanent solution is introduced


Thanks!

1 Like

After upgrading to v7.13 I also get the error

[FATAL] Using imap handler class: ImapHandler

I am trying to get Inbound Email working. When I run the “Test Connection Settings” command I get the response "Connection completed successfully. " However, in the log file there is the entry “[FATAL] Using imap handler class: ImapHandler”. When I try to select a monitored folder, the list for selection is empty.

Thanks for any help

Erhard