We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18878
    • 210 Posts
    Hello,

    I just upgraded the database version of MySQL to the latest 5.0.45. I had no problems with the upgrade and I followed the instructions on MySql’s website.

    After the upgrade, I was just testing and tried to create a new Manager User. When I save the new user, the browser hangs and the site never responds. It looks like the whole database goes down for a while because other Modx sites on the same server do not respond and cannot load. I had to stop the MySQL service a couple of times, and start it again.

    So I enabled the Server Logs and noticed that the last SQL statements before the whole thing hangs are:

    SELECT id FROM `modxdb`.`modx_manager_users` WHERE username='mx_test'
    
    SELECT id FROM `modxdb`.`modx_user_attributes` WHERE email='[email protected]'
    
    INSERT INTO `modxdb`.`modx_manager_users` (username, password) VALUES('mx_test', md5('secretpasswd'))
    
    INSERT INTO `modxdb`.`modx_user_attributes` (internalKey, fullname, role, email, phone, mobilephone, fax, zip, state, country, gender, dob, photo, comment, blocked, blockeduntil, blockedafter)	VALUES(8, 'John Smith', '2', '[email protected]', '', '', '', '', '', '', '0', '0', '', '', '0', '0', '0')
    


    I checked the database and the user "mx_test" is inserted on table modx_manager_users, however, on table modx_user_attributes the data that belongs to that user is NOT inserted.

    So I pasted the last INSERT INTO modx_user_attributes command on MySQL query browser and tried to execute it. It produced the following error:

    MySQL Database Error: Field ’sessionid’ doesn’t have a default value

    And then I noticed that the insert command is not including the sessionid field and sessionid is defined as NOT NULL. So I guess there’s the error.

    Does anyone know a workaround? Is this happening because I upgrade from MYSQL 5.0.27 to 5.0.45?

    Any help will be appreciated. Thanks.

    Mc
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Your new database engine is configured for "strict" mode.

      http://dev.mysql.com/doc/refman/5.0/en/faqs-sql-modes.html

      The most likely culprit is something like this in your my.ini
      sql-mode="STRICT_TRANS_TABLES"


      http://modxcms.com/forums/index.php/topic,2019.msg22548.html#msg22548
        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
        • 18878
        • 210 Posts
        Thanks a lot Sottwell!! That solved the problem.