We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4172
    • 5,888 Posts
    I will work thrue the tutorial again on a fresh installation with system-setting 'debug': 1 and fix that.

    In the meanwhile you can try, if setting your system-setting 'debug' to 0 does fix the E_NOTICE - errors

    [Edit]
    Done.
    And updated the package to version 2.0.1 pl [ed. note: Bruno17 last edited this post 11 years, 11 months ago.]
      -------------------------------

      you can buy me a beer, if you like MIGX

      http://webcmsolutions.de/migx.html

      Thanks!
      • 36932
      • 39 Posts
      At first: Bruno, thanks for your hard work on this one!

      I tested it again an nearly all problems seem to be resolved but one continues.
      My Setup is the same as last time, modX 2.2.2pl on PHP 5.3.5. I completely cleaned MIGX 2.0.0 from the system (incl. all tables) and installed the new 2.0.1pl. Then I exactly did what the doodles-tutorial tells me. Everything seems to work until you come to the doodles page the first time.

      If I visit it, I get the following in my error log:
       [2012-05-17 15:47:27] (ERROR @ /dev/modx/modx-2.2.2-pl/assets/components/migx/connector.php) Could not load class: doodles from mysql.doodles.
      [2012-05-17 15:47:27] (ERROR @ /dev/modx/modx-2.2.2-pl/assets/components/migx/connector.php) Could not load class: doodles from mysql.doodles.
      [2012-05-17 15:47:27] (ERROR @ /dev/modx/modx-2.2.2-pl/assets/components/migx/connector.php) doodles::getSelectColumns() is not a valid static method.
      [2012-05-17 15:47:27] (ERROR @ /dev/modx/modx-2.2.2-pl/assets/components/migx/connector.php) No class specified for loadClass
      [2012-05-17 15:47:27] (ERROR @ /dev/modx/modx-2.2.2-pl/assets/components/migx/connector.php) Could not load class 
      [2012-05-17 15:47:27] (ERROR @ /dev/modx/modx-2.2.2-pl/assets/components/migx/connector.php) No class specified for loadClass
      [2012-05-17 15:47:27] (ERROR @ /dev/modx/modx-2.2.2-pl/assets/components/migx/connector.php) Could not load class !
      [2012-05-17 15:47:27] (ERROR @ /dev/modx/modx-2.2.2-pl/assets/components/migx/connector.php) No class specified for loadClass
      [2012-05-17 15:47:27] (ERROR @ /dev/modx/modx-2.2.2-pl/assets/components/migx/connector.php) No class specified for loadClass
      [2012-05-17 15:47:27] (ERROR @ /dev/modx/modx-2.2.2-pl/assets/components/migx/connector.php) Could not load class: doodles from mysql.doodles.
      [2012-05-17 15:47:27] (ERROR @ /dev/modx/modx-2.2.2-pl/assets/components/migx/connector.php) Could not load class: doodles from mysql.doodles.
      [2012-05-17 15:47:27] (ERROR @ /dev/modx/modx-2.2.2-pl/assets/components/migx/connector.php) Could not load class doodles
      [2012-05-17 15:47:27] (ERROR @ /dev/modx/modx-2.2.2-pl/assets/components/migx/connector.php) Could not load class: doodles from mysql.doodles.
      [2012-05-17 15:47:27] (ERROR @ /dev/modx/modx-2.2.2-pl/assets/components/migx/connector.php) doodles::loadCollection() is not a valid static method.
      


      Looks like the Doodle class never gets loaded. My doodles directory looks ok though, at least as far as I can tell:

      Content of /core/components/doodles:
      model/
          doodles/
              mysql/
                  doodle.class.php
                  doodle.map.inc.php
              doodle.class.php
              metadata.mysql.php
          schema/
              doodles.mysql.schema.xml
      


      When I click the "Add Doodle" button in my Doodles CMP the only thing in the opening window is:
      Fatal error: Call to a member function set() on a non-object in /var/www/dev/modx/modx-2.2.2-pl/core/components/migx/processors/mgr/default/fields.php on line 29
      


      I had a short attempt on debugging it and this error stems from this (where $classname == 'doodles'):
      $object = $modx->newObject($classname);
      $object->set('object_id', 'new');
      


      After the first line $object is NULL, so my Doodle class isn't loaded there, too. This is, what the error log says after trying to add:

       [2012-05-17 15:54:51] (ERROR @ /dev/modx/modx-2.2.2-pl/assets/components/migx/connector.php) Could not load class: doodles from mysql.doodles.
      [2012-05-17 15:54:51] (ERROR @ /dev/modx/modx-2.2.2-pl/assets/components/migx/connector.php) Could not load class: doodles from mysql.doodles.
      


      I would love to help you with fixing this, but until now, I didn't have a chance to really look into XPDO, so I don't really have a clue what to do. If I can help you with more detailed information, just tell me, I'll try to give it to you then.

      Btw, another strange thing that I just stumbled over: I only get the messages in the error log if I set the system setting 'debug' to 0 or leave it empty, if I set it to 1 or something else, there are no more error logs or inline errors.

      With kind regards,
      Marc
        • 4172
        • 5,888 Posts
        trying to find an issue in the Tutorial or MIGXdb, I deleted the table and doodles-directory again and worked thrue it, I couldn't reproduce the issue.

        Do you get the correct packageName (doodles), prefix (null), classname (Doodle) when trying to echo them from core/components/migx/processors/mgr/default/getlist.php ?
        (see firebug-console-response)

        the table modx_doodles was created ?
          -------------------------------

          you can buy me a beer, if you like MIGX

          http://webcmsolutions.de/migx.html

          Thanks!
          • 36932
          • 39 Posts
          Hi Bruno,

          thanks a lot, you really nailed it here!

          After reading your advice, I debugged these variables and actually it turned out, that the classname in getlist.php was 'doodles' instead of 'Doodle'. In the Config (Components -> MIGX -> MIGX-> Right-click-editing 'Doodles' -> MIGXdb-Settings -> Classname field) I definitely used 'Doodle', so I looked it up in the DB to be sure.

          There I saw, that I had the 'doodles' config two times in modx_migx_configs, both with minor differences and both published. In the backend only the second one was shown, but programmatically the first one was used and in the extended field there was a "classname":"doodles". I don't know how this could happen, because I deleted those tables before reinstalling MIGX 2.0.1pl and I'm pretty sure, that I didn't make two configs on purpose.

          In the end it works now, so I can finally start exploring MIGXdb. Thanks a lot again for your help here, you saved me a lot of time and nerves!

          I think, that MIGXdb is a really handy extra and rises the usability and flexibility of MODX a lot because you can do pretty custom stuff without the need for writing a lot of code. If you ask me, this should definitely move to core sometimes. I have been using MIGX for some time and am really happy with it, the only drawback being not to be able to efficently search in entries for a lot of resources, so exactly the problem that MIGXdb should solve.

          With kind regards,
          Marc
            • 38524
            • 3 Posts
            Hello All:

            So, I'm not sure what is going on, but I'm having no success in creating my own MIGXdb structure.

            I followed the gallery example successfully. However, when adjusting the system to create product options, I simply can't get a working response. The error code, when I attempt to add a row, is:
            Fatal error: Call to a member function set() on a non-object in /home/pbeer/public_html/core/components/migx/processors/mgr/default/fields.php on line 34

            I used this schema to get started, which successfully created my table (confirmed when exploring the db table):
            <?xml version="1.0" encoding="UTF-8"?>
            <model package="teamOptions" baseClass="xPDOObject" platform="mysql" defaultEngine="MyISAM" version="1.1">
            <object class="teamoptions" table="migx_teamoptions" extends="xPDOSimpleObject" >
            <field key="league" dbtype="char" precision="5" phptype="string" null="false" default="" />
            <field key="teamcode" dbtype="char" precision="10" phptype="string" null="false" default="" />
            <field key="geography" dbtype="varchar" precision="255" phptype="string" null="false" default="" />
            <field key="mascot" dbtype="varchar" precision="255" phptype="string" null="false" default="" />
            <field key="pdactive" dbtype="tinyint" precision="1" phptype="integer" null="false" default="0" />
            <field key="bodycolor" dbtype="char" precision="10" phptype="string" null="false" default="" />
            <field key="lidcolor" dbtype="char" precision="10" phptype="string" null="false" default="" />
            <field key="umbactive" dbtype="tinyint" precision="1" phptype="integer" null="false" default="0" />

            <index alias="PRIMARY" name="PRIMARY" primary="true" unique="true">
            <column key="id" collation="A" null="false" />
            </index>

            <aggregate alias="Resource" class="modResource" local="resource_id" foreign="id" cardinality="one" owner="foreign" />
            <aggregate alias="Creator" class="modUser" local="createdby" foreign="id" cardinality="one" owner="foreign" />
            </object>

            </model>

            I manually created all of the TV elements instead of writing them in JSON.

            When posting, firebug is returning:
            HTTP_MODAUTH modxsss (replaced)
            action mgr/migxdb/fields
            class_key modDocument
            co_id
            configs teamoptions
            object_id new
            record_json
            resource_id 188
            storeParams {"action":"mgr/migxdb/getList","configs":"teamoptions","resource_id":"188","object_id":"","HTTP_MODAUTH":"modxsss"}
            tempParams
            tv_id 71
            tv_name teamoptions
            wctx PortaDraftv2

            I have tried everything I can find, but simply can't figure it out. Any ideas?
              • 4172
              • 5,888 Posts
              seems it can't create a teamoptions - object.

              not sure, if this can be an issue,
              but the first thing, what I would change is to rename your package to lowercase:

              teamOptions -> teamoptions

              rename your directory and your packagename-configuration and all that.
                -------------------------------

                you can buy me a beer, if you like MIGX

                http://webcmsolutions.de/migx.html

                Thanks!
                • 38524
                • 3 Posts
                Hey Bruno:

                Thanks for the response -- getting back to it today.

                So, I made those adjustments with no luck. I deleted all scheme files, etc., then recreated the setup with a new name and all lowercase. For some reason, I'm still getting the exact same error. I can't figure out for the life of me what I might be doing wrong.

                Do you have any idea why I'd be encountering this error?

                Thanks again,
                Albert
                  • 42046
                  • 436 Posts
                  I'm getting the same error when I click to add an item to the grid. Stumped as to how to try and solve it.

                  Fatal error: Call to a member function set() on a non-object in /var/sites/v/public_html/core/components/migx/processors/mgr/default/fields.php on line 34
                    • 36613
                    • 328 Posts
                    When add item i recive this error:
                    [2014-02-18 10:00:58] (WARN @ /assets/components/migx/connector.php) Could not load package metadata for package annunci.
                    [2014-02-18 10:00:58] (ERROR @ /assets/components/migx/connector.php) No class specified for loadClass