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

    when trying to create a new role, I’m getting the error below upon saving - does anybody know how to fix this?

    Thank you
    « MODx Parse Error »
    MODx encountered the following error while attempting to parse the requested resource: 
    « Execution of a query to the database failed - Out of range value adjusted for column 'edit_parser' at row 1 » 
          SQL: INSERT INTO `loc_sfinance`.modx_user_roles (name,description,frames,home,view_document,new_document,save_document,publish_document,delete_document,action_ok,logout,help,messages,new_user,edit_user,logs,edit_parser,save_parser,edit_template,settings,credits,new_template,save_template,delete_template,edit_snippet,new_snippet,save_snippet,delete_snippet,empty_cache,edit_document,change_password,error_dialog,about,file_manager,save_user,delete_user,save_password,edit_role,save_role,delete_role,new_role,access_permissions,bk_manager,new_plugin,edit_plugin,save_plugin,delete_plugin,new_module,edit_module,save_module,delete_module,exec_module,view_eventlog,delete_eventlog,manage_metatags,edit_doc_metatags,new_web_user,edit_web_user,save_web_user,delete_web_user,web_access_permissions,view_unpublished) VALUES('Manager','Website manager','1','1','1','1','1','1','1','1','1','1','0','0','0','1','','','0','1','1','0','0','0','0','0','0','0','1','1','1','1','1','1','0','0','1','0','0','0','0','0','1','0','0','0','0','0','0','0','0','0','1','1','1','1','0','0','0','0','0','1') ; 
          [Copy SQL to ClipBoard] 
      
    Parser timing 
      MySQL:  0.0026 s (1 Requests) 
      PHP:  1168772118.1071 s   
      Total:  
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      edit_parser, save_parser? I’m not familiar with those role options. What version are you using? (hover the mouse over the main version info in the upper right corner to get the build version number).
        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
        • 19889
        • 616 Posts
        Thank you for replying - I’m using the latest version I believe: 0.9.5 build 2106 - seems to be a problem only on my local installation - maybe an mysql 5 issue?
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          It is likely that it is a configuration issue with your mysql; these two fields do not appear to be used at present, and are not getting a value to make mysql happy.

          The file /manager/processors/save_role.processor.php, lines 35 and 36, are apparently supposed to be setting these to ’0’ if they aren’t set, but for some reason this doesn’t seem to be working, as they are just empty strings in the actual query. For a quick fix, try changing the conditional assignment to just ’0’ for those two lines.
            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
            • 22303 MODX Staff
            • 10,725 Posts
            And yes, this is an issue with MySQL STRICT mode as described elsewhere in the forums. Looks like a few spots were missed in the changes to support STRICT mode compliance.