We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38813
    • 29 Posts
    Hi, just getting a chance to check back.

    @pepebe Yes there are errors relating to the schema in the log. I hadn't modified the original schema at all. I just copied it exactly as I was trying to replicate the tutorial in it's entirety. The next round would have been a complete change as I was just playing with doodles to get familiar with MIGX.

    The errors relate to a missing default value for 'editedon'. I'll have a look in more detail tomorrow.

    Thanks for your help!

    Michael

      • 36519
      • 40 Posts
      Was this ever resolved?
      I have just started to play with migx and I am having the same issue.
      modx 2.2.6pl
      IIS 7.5
      php 5.3.13
      mysql MySQL 5.1.56
      mysql client API : mysqlnd 5.0.8-dev - 20102224

      Quote from: michaelc at Jan 21, 2013, 05:37 PM
      Hi, just getting a chance to check back.


      The errors relate to a missing default value for 'editedon'. I'll have a look in more detail tomorrow.


        • 38813
        • 29 Posts
        No, I was not able to get the issue resolved. I just gave up on it.





        Quote from: masakia at Mar 29, 2013, 09:36 AM
        Was this ever resolved?
        I have just started to play with migx and I am having the same issue.
        modx 2.2.6pl
        IIS 7.5
        php 5.3.13
        mysql MySQL 5.1.56
        mysql client API : mysqlnd 5.0.8-dev - 20102224

        Quote from: michaelc at Jan 21, 2013, 05:37 PM
        Hi, just getting a chance to check back.


        The errors relate to a missing default value for 'editedon'. I'll have a look in more detail tomorrow.


          • 34084 ☆ A M B ☆
          • 756 Posts
          Change your editedon column schema to allow for null:

          <field key="editedon" dbtype="datetime" phptype="datetime" null="true" />


          Then parse the schema and then you will need to alter the table to as well to allow for null value. In addition I went ahead and also set the same for the publishedon filed as well.

          <field key="publishedon" dbtype="datetime" phptype="datetime" null="true" />


          Will dig into migxdb more to see if a better solution can be found, but that's a quick fix.

          Cheers
            Evo Revo // Ubuntu, CentOS, Win // Apache 2x, Lighttp (Lighty)
            Visit CharlesMx.com for latest news and status updates.
            • 36519
            • 40 Posts
            OK, after reading Charles's post, I went and looked into this again.

            My problem is/was that I could not even create a MIGXdb to begin with. After clicking "Done" in attempt to create my first MIGXdb, the error message "quip.thread_err_save" immediately pops up and I was stuck.

            I was a little more reasonable today and had a wisdom to look into modx's Error log (really!)
            here is what I saw.

            [2013-04-19 14:02:20] (ERROR @ /assets/components/migx/connector.php) Error HY000 executing statement:
            INSERT INTO `modx_migx_configs` (`name`, `formtabs`, `contextmenus`, `actionbuttons`, `columnbuttons`, `filters`, `extended`, `columns`, `createdby`, `createdon`, `editedby`, `deleted`, `deletedby`, `published`, `publishedby`) VALUES ('activity', '[]', '', '', '', '', '{\"migx_add\":\"\",\"formcaption\":\"\",\"win_id\":\"activity\",\"multiple_formtabs\":\"\",\"packageName\":\"\",\"classname\":\"\",\"task\":\"\",\"getlistsort\":\"\",\"getlistsortdir\":\"\",\"use_custom_prefix\":\"0\",\"prefix\":\"\",\"grid\":\"\",\"gridload_mode\":\"1\",\"check_resid\":\"1\",\"check_resid_TV\":\"\",\"join_alias\":\"\",\"getlistwhere\":\"\",\"joins\":\"\",\"cmpmaincaption\":\"\",\"cmptabcaption\":\"\",\"cmptabdescription\":\"\",\"cmptabcontroller\":\"\"}', '', 1, '2013-04-19 14:02:20', 0, 0, 0, 1, 0)
            Array
            (
                [0] => HY000
                [1] => 1364
                [2] => Field 'editedon' doesn't have a default value
            )
            
            


            It showed the mysql operation did not go well when attempting to write to 'modx_migx_configs' table.
            I logged into the database using phpMyAdmin, went into the table and modified "editedon" field to accept null value.

            After that, I tried to create and save migx again. Same error message pops up, the Error log was the same except for this line
             [2] => Field 'deletedon' doesn't have a default value
            


            repeat the same process to modify "deletedon" field in mysql and

             [2] => Field 'publishedon' doesn't have a default value
            


            repeat the same process for the third time and I was finally able to make a MIGXdb for the first time.

            Charles talked about changing schema. I think this is so for consistency purpose (which I did on /core/components/migx/model/schema/ although I do not know if this is the right file)

            I still dont understand why I had to go through these extra steps to make the things work. Obviously the majority of people did not need to go through this. However, going through the forum posts, I have found this https://forums.modx.com/thread/?thread=58462&i=1&page=4

            The last post from lithiumlab basically describes my fix, although he was applying this to modx_quip_comments table