Overview
When searching for anything in Kayako Classic Download, the following exception is received:
Uncaught Exception
AutoExecute Query: AutoExecute Query: INSERT swsearchstores (array ( 'sessionid' => 'gM7CPU9K09lWAIB1ydsF1d2d25e4faeaffe89849e1912350626bd7a1a147RKFwmO8TT6Dtt', 'storetype' => 5, 'dateline' => 1557820459, 'lastupdate' => 1557820459, 'staffid' => '112', 'userid' => false, )) in ./__swift/library/Database/class.SWIFT_Database.php:603
Environment
Kayako Classic Download
Root Cause
MySQL Strict Mode is enabled by default and should be disabled to use Kayako Classic Download.
Resolution
Disable MySQL Strict Mode at the server level (recommended).
Alternatively, disable MySQL Strict Mode at the session-level (instructions are provided below). Before proceeding, please note:
- This configuration ensures that every time Kayako Classic wants to connect to the MySQL Database, Strict Mode will be disabled at the session-level.
- The user must have the necessary permissions on the database to disable Strict Mode.
Launch a text editor and follow these steps:
- Open the following file:
__swift/library/Database/class.SWIFT_Database.php
- Find the method
__construct()
- At the end of that method, just before the line:
return parent::__construct()
, add the following line of code:$this->Execute("SET SESSION sql_mode=''");
- At the end of that method, just after the line:
return parent::__construct()
, add the following code:if(defined('DISABLE_MYSQL_STRICT_SESSION') && DISABLE_MYSQL_STRICT_SESSION) {
$result = $this->Execute("SET SESSION sql_mode=''");
}This is what it looks like in a code enabled text editor:
- Restart the MySQL services.
Confirmation
Perform the action again to confirm the Uncaught Exception is no longer received.