We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3232
    • 380 Posts
    I just upgraded to the latest release and get the following error when i try to run a custom snippet.

    "Error while inserting event log into database."

    The snippet fully executes but the screen just goes white with the message above. what would cause this error?
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      There’s an error or a warning when running the snippet, and it’s trying to record this in the event log, which is failing. Sounds like something happened to the event log table; it should have this structure (export from phpMyAdmin):
      CREATE TABLE `modx_event_log` (
      `id` int(11) NOT NULL auto_increment,
      `eventid` int(11) default ’0’,
      `createdon` int(11) NOT NULL default ’0’,
      `type` tinyint(4) NOT NULL default ’1’ COMMENT ’1- information, 2 - warning, 3- error’,
      `user` int(11) NOT NULL default ’0’ COMMENT ’link to user table’,
      `usertype` tinyint(4) NOT NULL default ’0’ COMMENT ’0 - manager, 1 - web’,
      `source` varchar(50) NOT NULL default ’’,
      `description` text,
      PRIMARY KEY (`id`),
      KEY `user` (`user`)
      ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT=’Stores event and error logs’;
      The most likely culprit is that it lost the auto_increment part to the id field.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 3232
        • 380 Posts
        turns out the collation was off for every table.. it was set to latin1_swedish_ci

        Once i changed it over to utf8... it started working.

        Is there any easy way to change all tables back to utf8?