We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21739
    • 49 Posts
    Getting a few errors, fresh modx install, fresh migx install (latest versions).

    When trying to edit a raw config entry:
    Warning: array_key_exists() expects parameter 2 to be array, null given in /*/core/components/migx/processors/mgr/migxdb/fields.class.php on line 31 


    When trying to import/export json:
    Warning: json_decode() expects parameter 1 to be string, array given in /*/core/components/migx/model/migx/migx.class.php on line 1705 


    In the Modx error log this is coming up:
    [*] (ERROR @ /assets/components/migx/connector.php) addPackage called with an invalid package name.
    [2013-05-28 22:05:45] (ERROR @ /assets/components/migx/connector.php) Error 42S22 executing statement: 
    Array
    (
        [0] => 42S22
        [1] => 1054
        [2] => Unknown column 'modResource.resource_id' in 'where clause'
    )


    Currently using a regular migx tv without issues. Migxdb only seems to be giving me issues.

    Tried re-running the "setup" under the setup/upgrade tab... and I've tried reinstalling the migx package entirely, which also didn't help.

    What am I missing?
      • 21739
      • 49 Posts
      up..
        • 4172
        • 5,888 Posts
        some more infos?
          -------------------------------

          you can buy me a beer, if you like MIGX

          http://webcmsolutions.de/migx.html

          Thanks!
          • 21739
          • 49 Posts
          Quote from: Bruno17 at Jun 03, 2013, 09:42 AM
          some more infos?

          Anything specific you'd like to know?

          For example, when editing the raw data for a migx config, see attachement.
            • 4172
            • 5,888 Posts
            for the last one try to mod this line (31 in fields.class.php) to:

            if (is_array($tempParams) && array_key_exists('action',$tempParams) && !empty($tempParams['action'])) 


            and in migx.class.php mod this function to:

                function recursive_decode($array) {
                    foreach ($array as $key => $value) {
                        if (is_string($value) && $decoded = json_decode($value, true)) {
                            $array[$key] = $this->recursive_decode($decoded);
                        } else {
                            $array[$key] = $this->recursive_decode($value);
                        }
                    }
                    return $array;
                }
            


            does this help to fix this warnings?
              -------------------------------

              you can buy me a beer, if you like MIGX

              http://webcmsolutions.de/migx.html

              Thanks!
              • 21739
              • 49 Posts
              This does fix the warnings I'm getting when editing the raw data.
              The other errors however remain. Any idea whats causing this?
                • 43288
                • 35 Posts
                I am seeing the same log error with MIGXdb : clean 2.2.9 install, using childstutorial, MIGX seems to work but MIGXdb is giving me this in the error log:

                 [2013-09-05 19:23:24] (ERROR @ /assets/components/migx/connector.php) Error 42S22 executing statement: 
                Array
                (
                    [0] => 42S22
                    [1] => 1054
                    [2] => Unknown column 'modResource.resource_id' in 'where clause'
                )
                


                and the TV on the parent resource reports "No items found" and "No data to display".

                Any resolutions?

                Thanks, watou
                  • 4172
                  • 5,888 Posts
                  I think you are missing the childresources - processors

                  https://github.com/Bruno17/MIGX/tree/aa1d9efa2f6d02a16cfdb7059389d5f118c83ad3/core/components/migx/processors/mgr

                  they were removed some time ago, but you can get them from there and add the childresources - folder and its processors to your migx-installation.
                  They should still work.
                    -------------------------------

                    you can buy me a beer, if you like MIGX

                    http://webcmsolutions.de/migx.html

                    Thanks!
                    • 43288
                    • 35 Posts
                    Thank you, Bruno! I added the missing files and it's now working as I expected. But now I'm curious why they were removed; does that suggest that there is a better way to achieve this interface than with this approach?

                    Your help is much appreciated,
                    watou
                      • 40737
                      • 32 Posts
                      Hi,

                      i also followed the tutorial at http://rtfm.modx.com/extras/revo/migxdb/migxdb.tutorials/migxdb.manage-child-resources-in-a-grid-tv-with-help-of-migxdb and was looking for a mistake i did because of "No items found" and "No data to display". So is this tutorial not the way to go now?

                      Best,

                      Mike