We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 49407
    • 159 Posts
    I'm trying to add a new context in Revo 2.5.1-pl and when I add permissions I get this error in the screenshot.

    Also, the context doesn't seem to be working because there are no permissions set so it doesn't hit the resource that it's set to and this error is in the Modx error log:

    [2017-10-16 13:41:54] (ERROR @ /var/www/canna_core_modx/xpdo/om/xpdoobject.class.php : 1452) Error HY000 executing statement:
    INSERT INTO `modx_access_context` (`target`, `principal_class`, `principal`, `authority`, `policy`) VALUES ('control', 'modUserGroup', 0, 9999, 3)
    Array
    (
        [0] => HY000
        [1] => 1364
        [2] => Field 'id' doesn't have a default value
    )


    Is this a known issue or am I a special snowflake? tongue

    UPDATE: The context is working now (forgot to initialize it, oops!), but I'm still getting the ACL Error. [ed. note: aaronkent last edited this post 6 years, 6 months ago.]
      • 3749
      • 24,544 Posts
      Screenshots no longer work in the Forum. You have to put the image somewhere else and provide a link to it.

      Try manually deleting all files in the core/cache directory.
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 49407
        • 159 Posts
        Thank you, Bob. I did as you suggested, but I'm still getting the "Error saving ACL!" popup and the same error in the log.
          • 3749
          • 24,544 Posts
          I think this is probably a MySQL issue rather than a MODX issue.

          One possible cause is the STRICT_TRANS_TABLES SQL mode defined in the %PROGRAMDATA%\MySQL\MySQL Server 5.7\my.ini
          file. Removing that setting and restarting MySQL may fix the problem.
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting