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

Answered Fatal error

    • 40643
    • 36 Posts
    I created a new CMP and when I went to add data, I received the following error:

    Fatal error: Call to a member function set() on a non-object in /home/peppermg/public_html/development/saraa/core/components/migx/processors/mgr/default/fields.php on line 37

    I created it like the others but I didnt get this error. Can you give me a clue how to fix it?

    Thanks

    Lisa

    This question has been answered by multiple community members. See the first response.

    • discuss.answer
      • 3749
      • 24,544 Posts
      Looking at the code, I'd guess that the 'classname' set in the config is either misspelled or refers to a class that doesn't exist at that point.
        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
        • 40643
        • 36 Posts
        Hey Bob. Thanks for your assistance. Can you review below? I am not seeing anything different from the others I have created.

        <?xml version="1.0" encoding="UTF-8"?>
        <model package="alerts" baseClass="xPDOObject" platform="mysql" defaultEngine="MyISAM" version="1.1">
        <object class="Saraa Alerts" table="alerts" extends="xPDOSimpleObject">
        <field key="name" dbtype="varchar" precision="255" phptype="string" null="false" default=""/>
        <field key="description" dbtype="text" phptype="string" null="false" default=""/>
        <field key="age" dbtype="tinyint" precision="2" attributes="unsigned" phptype="integer" null="false" default="0" />
        <field key="missingdate" dbtype="datetime" phptype="datetime" null="true"/>
        <field key="photo" dbtype="text" phptype="string" null="false" default=""/>
        <field key="createdon" dbtype="datetime" phptype="datetime" null="true"/>
        <field key="createdby" dbtype="int" precision="10" attributes="unsigned" phptype="integer" null="false" default="0" />
        <field key="editedon" dbtype="datetime" phptype="datetime" null="true"/>
        <field key="editedby" dbtype="int" precision="10" attributes="unsigned" phptype="integer" null="false" default="0" />
        <field key="deleted" dbtype="tinyint" precision="1" attributes="unsigned" phptype="integer" null="false" default="0" />
        <field key="published" dbtype="tinyint" precision="1" attributes="unsigned" phptype="integer" null="false" default="0" />

        <aggregate alias="CreatedBy" class="modUser" local="createdby" foreign="id" cardinality="one" owner="foreign"/>
        <aggregate alias="EditedBy" class="modUser" local="editedby" foreign="id" cardinality="one" owner="foreign"/>
        </object>
        </model>

        Here are my columns:

        [{"MIGX_id":"2","header":"ID","dataIndex":"id","width":"","sortable":"false","show_in_grid":"1","renderer":"","clickaction":"","selectorconfig":"","renderoptions":"[]"},{"MIGX_id":"3","header":"Child's Name","dataIndex":"name","width":"","sortable":"true","show_in_grid":"1","renderer":"","clickaction":"","selectorconfig":"","renderoptions":"[]"},{"MIGX_id":"4","header":"Age","dataIndex":"age","width":"","sortable":"false","show_in_grid":"1","renderer":"","clickaction":"","selectorconfig":"","renderoptions":"[]"},{"MIGX_id":"5","header":"Missing Date","dataIndex":"missingdate","width":"","sortable":"true","show_in_grid":"1","renderer":"","clickaction":"","selectorconfig":"","renderoptions":"[]"},{"MIGX_id":"6","header":"Published","dataIndex":"published","width":"","sortable":"false","show_in_grid":"1","renderer":"","clickaction":"","selectorconfig":"","renderoptions":"[]"},{"MIGX_id":"8","header":"","dataIndex":"deleted","width":"","sortable":"false","show_in_grid":"0","renderer":"","clickaction":"","selectorconfig":"","renderoptions":"[]"},{"MIGX_id":"9","header":"Child's Photo","dataIndex":"photo","width":"","sortable":"false","show_in_grid":"1","renderer":"","clickaction":"","selectorconfig":"","renderoptions":"[]"}]

        Thanks for your help
          • 4172
          • 5,888 Posts
          this package-directory is created under components/alerts/ ?

          you have 'alerts' as package-name in your MIGXdb - settings ?

          and I think its not a good idea to have a classname with spaces in it: class="Saraa Alerts"
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 40643
            • 36 Posts
            Quote from: Bruno17 at Jun 19, 2013, 07:33 AM
            this package-directory is created under components/alerts/ ?

            you have 'alerts' as package-name in your MIGXdb - settings ?

            Yes to the above.

            I changed the class and parsed the schema but I am still getting the same error.

            Thanks
            • discuss.answer
              • 4172
              • 5,888 Posts
              you did also change the classname in the migx-config to the new one?
                -------------------------------

                you can buy me a beer, if you like MIGX

                http://webcmsolutions.de/migx.html

                Thanks!
                • 40643
                • 36 Posts
                You are wonderful! That worked.

                Thank you