We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 44580
    • 189 Posts
    I'm getting two different MIGX errors in my error logs (Revo 2.3.1 and MIGX 2.8.1)

    1. (ERROR @ /var/www/hca/core/components/migx/model/migx/migx.class.php : 1911) PHP warning: Invalid argument supplied for foreach()

    I get multiples of these every time I right click on a config and select "Export/ Import". It seems not to affect anything. A bug?

    2. [2014-11-18 11:49:26] (ERROR @ /assets/components/migx/connector.php) addPackage called with an invalid package name.

    This one concerns me more. I get this whenever I access one particular Formtab. I have looked at this until I've gone cross-eyed and I cannot see what is wrong. A better pair of eyes would be appreciated.

    This is the Json:
    {
      "formtabs":[
        {
          "MIGX_id":1,
          "caption":"Coach details",
          "print_before_tabs":"0",
          "fields":[
            {
              "MIGX_id":1,
              "field":"coach_id",
              "caption":"Coach",
              "description":"",
              "description_is_code":"0",
              "inputTV":"",
              "inputTVtype":"listbox",
              "validation":"",
              "configs":"",
              "restrictive_condition":"",
              "display":"",
              "sourceFrom":"config",
              "sources":"",
              "inputOptionValues":"@CHUNK getCoachList",
              "default":"",
              "pos":1
            },
            {
              "MIGX_id":2,
              "field":"coach_bio",
              "caption":"Coach Bio",
              "description":"The biography of the coach",
              "description_is_code":"0",
              "inputTV":"",
              "inputTVtype":"textarea",
              "validation":"",
              "configs":"",
              "restrictive_condition":"",
              "display":"",
              "sourceFrom":"config",
              "sources":"",
              "inputOptionValues":"",
              "default":"",
              "pos":2
            },
            {
              "MIGX_id":3,
              "field":"makeup_1",
              "caption":"Lesson makeup day (1)",
              "description":"The first day that can be used for making up lessons.",
              "description_is_code":"0",
              "inputTV":"",
              "inputTVtype":"listbox",
              "validation":"",
              "configs":"",
              "restrictive_condition":"",
              "display":"",
              "sourceFrom":"config",
              "sources":"",
              "inputOptionValues":"Monday==Monday||Tuesday==Tuesday||Wednesday==Wednesday||Thursday==Thursday||Friday==Friday||Saturday==Saturday||Sunday==Sunday",
              "default":"",
              "pos":3
            },
            {
              "MIGX_id":4,
              "field":"makeup_2",
              "caption":"Lesson makeup day (2)",
              "description":"The second day that can be used for making up lessons.",
              "description_is_code":"0",
              "inputTV":"",
              "inputTVtype":"listbox",
              "validation":"",
              "configs":"",
              "restrictive_condition":"",
              "display":"",
              "sourceFrom":"config",
              "sources":"",
              "inputOptionValues":"Monday==Monday||Tuesday==Tuesday||Wednesday==Wednesday||Thursday==Thursday||Friday==Friday||Saturday==Saturday||Sunday==Sunday",
              "default":"",
              "pos":4
            },
            {
              "MIGX_id":5,
              "field":"makeup_3",
              "caption":"Lesson makeup day (3)",
              "description":"The third day that can be used for making up lessons.",
              "description_is_code":"0",
              "inputTV":"",
              "inputTVtype":"listbox",
              "validation":"",
              "configs":"",
              "restrictive_condition":"",
              "display":"",
              "sourceFrom":"config",
              "sources":"",
              "inputOptionValues":"Monday==Monday||Tuesday==Tuesday||Wednesday==Wednesday||Thursday==Thursday||Friday==Friday||Saturday==Saturday||Sunday==Sunday",
              "default":"",
              "pos":5
            }
          ],
          "pos":1
        }
      ],
      "contextmenus":"update||remove",
      "actionbuttons":"addItem",
      "columnbuttons":"update||remove",
      "filters":"",
      "extended":{
        "migx_add":"Add coach details",
        "disable_add_item":"",
        "formcaption":"Add coach details",
        "update_win_title":"Add coach details",
        "win_id":"CoachDetails",
        "maxRecords":"",
        "addNewItemAt":"bottom",
        "multiple_formtabs":"",
        "actionbuttonsperrow":4,
        "winbuttonslist":"cancel||done",
        "extrahandlers":"",
        "filtersperrow":4,
        "packageName":"add",
        "classname":"CoachDetails",
        "task":"",
        "getlistsort":"",
        "getlistsortdir":"",
        "sortconfig":"",
        "gridpagesize":"",
        "use_custom_prefix":1,
        "prefix":"add_",
        "grid":"",
        "gridload_mode":1,
        "check_resid":1,
        "check_resid_TV":"",
        "join_alias":"",
        "has_jointable":"yes",
        "getlistwhere":"",
        "joins":[
          {
            "alias":"Profile",
            "classname":"modUserProfile",
            "on":"Profile.internalKey=CoachDetails.coach_id"
          }
        ],
        "cmpmaincaption":"Coach Details",
        "cmptabcaption":"Coach info",
        "cmptabdescription":"Additional information about each coach",
        "cmptabcontroller":"",
        "winbuttons":"",
        "onsubmitsuccess":"",
        "submitparams":""
      },
      "columns":[
        {
          "MIGX_id":6,
          "header":"",
          "dataIndex":"id",
          "width":5,
          "sortable":"false",
          "show_in_grid":"0",
          "renderer":"",
          "clickaction":"",
          "selectorconfig":"",
          "renderchunktpl":"",
          "renderoptions":""
        },
        {
          "MIGX_id":1,
          "header":"Coach",
          "dataIndex":"Profile_fullname",
          "width":8,
          "sortable":"false",
          "show_in_grid":1,
          "renderer":"",
          "clickaction":"",
          "selectorconfig":"",
          "renderchunktpl":"",
          "renderoptions":""
        },
        {
          "MIGX_id":2,
          "header":"Coach Bio",
          "dataIndex":"coach_bio",
          "width":50,
          "sortable":"false",
          "show_in_grid":1,
          "renderer":"",
          "clickaction":"",
          "selectorconfig":"",
          "renderchunktpl":"",
          "renderoptions":""
        },
        {
          "MIGX_id":3,
          "header":"Makeup day 1",
          "dataIndex":"makeup_1",
          "width":9,
          "sortable":"false",
          "show_in_grid":1,
          "renderer":"",
          "clickaction":"",
          "selectorconfig":"",
          "renderchunktpl":"",
          "renderoptions":""
        },
        {
          "MIGX_id":4,
          "header":"Makeup day 2",
          "dataIndex":"makeup_2",
          "width":9,
          "sortable":"false",
          "show_in_grid":1,
          "renderer":"",
          "clickaction":"",
          "selectorconfig":"",
          "renderchunktpl":"",
          "renderoptions":""
        },
        {
          "MIGX_id":5,
          "header":"Makeup day 3",
          "dataIndex":"makeup_3",
          "width":9,
          "sortable":"false",
          "show_in_grid":1,
          "renderer":"",
          "clickaction":"",
          "selectorconfig":"",
          "renderchunktpl":"",
          "renderoptions":""
        }
      ]
    }

    This is the getCoachList chunk:
    [[migxLoopCollection?
    &classname=`modUserProfile`
    &tpl=`@CODE:[[+fullname]]==[[+internalKey]]`
    &outputSeparator=`||`
    &where=`{"User.primary_group":"2"}`
    &joins=`[{"alias":"User"}]`
    ]]

    This is the relevant part of the schema:
    <?xml version="1.0" encoding="UTF-8"?>
    <model package="add" baseClass="xPDOObject" platform="mysql" defaultEngine="MyISAM" version="1.1">
    	<object class="CoachDetails" table="coach_details" extends="xPDOSimpleObject">
    		<field key="coach_id" dbtype="int" precision="11" phptype="integer" null="false" index="unique" />
    		<field key="coach_bio" dbtype="varchar" precision="1000" phptype="string" null="true" />
    		<field key="makeup_1" dbtype="varchar" precision="45" phptype="string" null="true" />
    		<field key="makeup_2" dbtype="varchar" precision="45" phptype="string" null="true" />
    		<field key="makeup_3" dbtype="varchar" precision="45" phptype="string" null="true" />
    
    		<index alias="coach_id_idx" name="coach_id_idx" primary="false" unique="true" type="BTREE" >
    			<column key="coach_id" length="" collation="A" null="false" />
    		</index>
    	</object>

    Can anyone see what I'm doing wrong?