MIGXdb CMP - add items directly (one config fails, one succeeds)

I have a Database Schema for a basic Product Catalog and 6 CMPs used to manage data.

The CMPs should allow Add Items Directly ie. selecting Add Item button adds a new row to the grid.

This works for 3 of the 6 CMPs:

Working

  • Brochures
  • Products
  • Content Blocks

Not Working

  • Brands
  • Categories
  • Subcategories

Opening the Brands CMP logs the following error in the modx error log.

[2025-09-25 13:08:07] (ERROR @ /home/runcloud/webapps/dev_website_com/httpdocs/core/cache/mgr/smarty/default/d304d7c24d4d66df3bb18044c10cce45df1ab45b_0.file.dragdrop.grid.tpl.php : 37) PHP warning: Undefined array key "gridpagesize"
[2025-09-25 13:08:07] (ERROR @ /home/runcloud/webapps/dev_website_com/httpdocs/core/cache/mgr/smarty/default/d304d7c24d4d66df3bb18044c10cce45df1ab45b_0.file.dragdrop.grid.tpl.php : 290) PHP warning: Undefined array key "autoResourceFolders"
[2025-09-25 13:08:07] (ERROR @ /home/runcloud/webapps/dev_website_com/httpdocs/core/cache/mgr/smarty/default/d304d7c24d4d66df3bb18044c10cce45df1ab45b_0.file.dragdrop.grid.tpl.php : 376) PHP warning: Undefined array key "jsonvarkey"
[2025-09-25 13:08:07] (ERROR @ /home/runcloud/webapps/dev_website_com/httpdocs/core/cache/mgr/smarty/default/d304d7c24d4d66df3bb18044c10cce45df1ab45b_0.file.dragdrop.grid.tpl.php : 432) PHP warning: Undefined array key "iframeWindowTitle"
[2025-09-25 13:08:07] (ERROR @ /home/runcloud/webapps/dev_website_com/httpdocs/core/cache/mgr/smarty/default/eb4cb204a3bdaefeeca3355ab5036698039bd9ca_0.file.gridpanel.tpl.php : 69) PHP warning: Undefined array key "customHandlers"
[2025-09-25 13:08:07] (ERROR @ /home/runcloud/webapps/dev_website_com/httpdocs/core/cache/mgr/smarty/default/eb4cb204a3bdaefeeca3355ab5036698039bd9ca_0.file.gridpanel.tpl.php : 69) PHP warning: Attempt to read property "value" on null

Can anyone help me figure the cause of the issue please?

I’ve compared the working configs to the non-working ones but can’t see a critical difference.

catalog.schema.xml

``

<?xml version="1.0" encoding="UTF-8"?>
<!-- 1. Brands table -->
<object class="CatalogBrand" table="catalog__brand" extends="xPDOSimpleObject">
    <field key="name" dbtype="varchar" precision="155" phptype="string" null="false" default="" index="index" />
    <field key="logo" dbtype="varchar" precision="255" phptype="string" null="false" default="" />
    
    <!-- used by MIGX -->
    <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="1" />
    <field key="pos" dbtype="int" precision="10" phptype="integer" null="false" default="0" />

    <!-- good practice for tracking -->
    <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" />

    <!-- relationships -->
    <composite alias="CatalogProduct" class="CatalogProduct" local="id" foreign="brand_id" cardinality="many" owner="local" />
    
    <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>

<!-- 2. Product Categories table -->
<object class="CatalogCategory" table="catalog__category" extends="xPDOSimpleObject">
    <field key="title" dbtype="varchar" precision="155" phptype="string" null="false" default="" index="index" />
    <field key="introtext" dbtype="text" phptype="string" null="false" default="" />
    <field key="image" dbtype="varchar" precision="255" phptype="string" null="false" default="" />
    
    <!-- used by MIGX -->
    <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="1" />
    <field key="pos" dbtype="int" precision="10" phptype="integer" null="false" default="0" />

    <!-- good practice for tracking -->
    <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" />

    <!-- relationships -->
    <composite alias="CatalogSubcategory" class="CatalogSubcategory" local="id" foreign="category_id" cardinality="many" owner="local" />
    
    <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>

<!-- 3. Product Subcategories table -->
<object class="CatalogSubcategory" table="catalog__subcategory" extends="xPDOSimpleObject">
    <field key="category_id" dbtype="int" precision="11" phptype="integer" null="false" default="" index="index" />
    <field key="title" dbtype="varchar" precision="155" phptype="string" null="false" default="" index="index" />
    <field key="introtext" dbtype="text" phptype="string" null="false" default="" />
    <field key="image" dbtype="varchar" precision="255" phptype="string" null="false" default="" />
    
    <!-- used by MIGX -->
    <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="1" />
    <field key="pos" dbtype="int" precision="10" phptype="integer" null="false" default="0" />

    <!-- good practice for tracking -->
    <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" />

    <!-- relationships -->
    <composite alias="CatalogProduct" class="CatalogProduct" local="id" foreign="subcategory_id" cardinality="many" owner="local" />
    <aggregate alias="CatalogCategory" class="CatalogCategory" local="category_id" foreign="id" cardinality="one" owner="foreign" />
    
    <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>

<!-- 4. Brochures table -->
<object class="CatalogBrochure" table="catalog__brochure" extends="xPDOSimpleObject">
    <field key="title" dbtype="varchar" precision="155" phptype="string" null="false" default="" index="index" />
    <field key="introtext" dbtype="text" phptype="string" null="false" default="" />
    <field key="image" dbtype="varchar" precision="255" phptype="string" null="false" default="" />
    <field key="image_alt" dbtype="varchar" precision="255" phptype="string" null="false" default="" />
    <field key="brochure_file" dbtype="varchar" precision="255" phptype="string" null="false" default="" />
    
    <!-- used by MIGX -->
    <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="1" />
    <field key="pos" dbtype="int" precision="10" phptype="integer" null="false" default="0" />

    <!-- good practice for tracking -->
    <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" />

    <!-- relationships -->
    <composite alias="CatalogProduct" class="CatalogProduct" local="id" foreign="brochure_id" cardinality="many" owner="local" />
    
    <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>

<!-- 5. Products table -->
<object class="CatalogProduct" table="catalog__product" extends="xPDOSimpleObject">
    <field key="subcategory_id" dbtype="int" precision="11" phptype="integer" null="false" default="" index="index" />
    <field key="brand_id" dbtype="int" precision="11" phptype="integer" null="false" default="" index="index" />
    <field key="brochure_id" dbtype="int" precision="11" phptype="integer" null="true" default="" index="index" />
    <field key="title" dbtype="varchar" precision="155" phptype="string" null="false" default="" index="index" />
    <field key="subtitle" dbtype="varchar" precision="255" phptype="string" null="false" default="" />
    <field key="introtext_main" dbtype="text" phptype="string" null="false" default="" />
    <field key="introtext_more" dbtype="text" phptype="string" null="false" default="" />
    <field key="is_in_showroom" dbtype="tinyint" precision="1" attributes="unsigned" phptype="integer" null="false" default="0" />
    <field key="price" dbtype="decimal" precision="10,2" phptype="float" null="false" default="0.00" />
    <field key="main_image" dbtype="varchar" precision="255" phptype="string" null="false" default="" />
    
    <!-- used by MIGX -->
    <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="1" />
    <field key="pos" dbtype="int" precision="10" phptype="integer" null="false" default="0" />

    <!-- good practice for tracking -->
    <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" />

    <!-- relationships -->
    <composite alias="CatalogProductSpecification" class="CatalogProductSpecification" local="id" foreign="product_id" cardinality="many" owner="local" />
    <composite alias="CatalogProductGallery" class="CatalogProductGallery" local="id" foreign="product_id" cardinality="many" owner="local" />
    
    <aggregate alias="CatalogSubcategory" class="CatalogSubcategory" local="subcategory_id" foreign="id" cardinality="one" owner="foreign" />
    <aggregate alias="CatalogBrand" class="CatalogBrand" local="brand_id" foreign="id" cardinality="one" owner="foreign" />
    <aggregate alias="CatalogBrochure" class="CatalogBrochure" local="brochure_id" foreign="id" cardinality="one" owner="foreign" />
    
    <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>

<!-- Product Specifications nested table -->
<object class="CatalogProductSpecification" table="catalog__product_specification" extends="xPDOSimpleObject">
    <field key="product_id" dbtype="int" precision="11" phptype="integer" null="false" default="" index="index" />
    <field key="spec_name" dbtype="varchar" precision="155" phptype="string" null="false" default="" />
    <field key="spec_value" dbtype="varchar" precision="255" phptype="string" null="false" default="" />
    
    <!-- used by MIGX -->
    <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="1" />
    <field key="pos" dbtype="int" precision="10" phptype="integer" null="false" default="0" />

    <!-- good practice for tracking -->
    <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" />

    <!-- relationships -->
    <aggregate alias="CatalogProduct" class="CatalogProduct" local="product_id" foreign="id" cardinality="one" owner="foreign" />
    
    <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>

<!-- Product Gallery nested table -->
<object class="CatalogProductGallery" table="catalog__product_gallery" extends="xPDOSimpleObject">
    <field key="product_id" dbtype="int" precision="11" phptype="integer" null="false" default="" index="index" />
    <field key="gallery_image" dbtype="varchar" precision="255" phptype="string" null="false" default="" />
    <field key="gallery_alt_text" dbtype="varchar" precision="255" phptype="string" null="false" default="" />
    
    <!-- used by MIGX -->
    <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="1" />
    <field key="pos" dbtype="int" precision="10" phptype="integer" null="false" default="0" />

    <!-- good practice for tracking -->
    <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" />

    <!-- relationships -->
    <aggregate alias="CatalogProduct" class="CatalogProduct" local="product_id" foreign="id" cardinality="one" owner="foreign" />
    
    <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>

<!-- 6. Content Blocks table -->
<object class="CatalogContentBlock" table="catalog__content_block" extends="xPDOSimpleObject">
    <field key="title" dbtype="varchar" precision="155" phptype="string" null="false" default="" index="index" />
    <field key="subtitle" dbtype="varchar" precision="255" phptype="string" null="false" default="" />
    <field key="introtext" dbtype="text" phptype="string" null="false" default="" />
    <field key="image" dbtype="varchar" precision="255" phptype="string" null="false" default="" />
    <field key="image_alt" dbtype="varchar" precision="255" phptype="string" null="false" default="" />
    <field key="content" dbtype="mediumtext" phptype="string" null="false" default="" />
    
    <!-- used by MIGX -->
    <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="1" />
    <field key="pos" dbtype="int" precision="10" phptype="integer" null="false" default="0" />

    <!-- good practice for tracking -->
    <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" />

    <!-- relationships -->
    <composite alias="CatalogContentBlockImageRow" class="CatalogContentBlockImageRow" local="id" foreign="content_block_id" cardinality="many" owner="local" />
    
    <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>

<!-- Content Block Image Row nested table -->
<object class="CatalogContentBlockImageRow" table="catalog__content_block_image_row" extends="xPDOSimpleObject">
    <field key="content_block_id" dbtype="int" precision="11" phptype="integer" null="false" default="" index="index" />
    <field key="row_image" dbtype="varchar" precision="255" phptype="string" null="false" default="" />
    <field key="row_image_alt" dbtype="varchar" precision="255" phptype="string" null="false" default="" />
    
    <!-- used by MIGX -->
    <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="1" />
    <field key="pos" dbtype="int" precision="10" phptype="integer" null="false" default="0" />

    <!-- good practice for tracking -->
    <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" />

    <!-- relationships -->
    <aggregate alias="CatalogContentBlock" class="CatalogContentBlock" local="content_block_id" foreign="id" cardinality="one" owner="foreign" />
    
    <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>

MIGX configs to follow…
``

brochures.config.xml - Add Items Directly works.

{
  "formtabs":[
    {
      "MIGX_id":95,
      "caption":"Brochure Details",
      "print_before_tabs":"0",
      "fields":[
        {
          "MIGX_id":402,
          "field":"title",
          "caption":"Brochure Title",
          "description":"Enter the brochure title",
          "description_is_code":"0",
          "inputTV":"",
          "inputTVtype":"textfield",
          "validation":"",
          "configs":"",
          "restrictive_condition":"",
          "display":"",
          "sourceFrom":"config",
          "sources":"",
          "inputOptionValues":"",
          "default":"New Brochure",
          "useDefaultIfEmpty":"0",
          "pos":1
        },
        {
          "MIGX_id":403,
          "field":"introtext",
          "caption":"Description",
          "description":"Enter a description for this brochure",
          "description_is_code":"0",
          "inputTV":"",
          "inputTVtype":"textarea",
          "validation":"",
          "configs":"",
          "restrictive_condition":"",
          "display":"",
          "sourceFrom":"config",
          "sources":"",
          "inputOptionValues":"",
          "default":"",
          "useDefaultIfEmpty":"0",
          "pos":2
        },
        {
          "MIGX_id":404,
          "field":"image",
          "caption":"Cover Image",
          "description":"Upload a cover image for the brochure",
          "description_is_code":"0",
          "inputTV":"",
          "inputTVtype":"image",
          "validation":"",
          "configs":"",
          "restrictive_condition":"",
          "display":"",
          "sourceFrom":"config",
          "sources":"",
          "inputOptionValues":"",
          "default":"",
          "useDefaultIfEmpty":"0",
          "pos":3
        },
        {
          "MIGX_id":405,
          "field":"image_alt",
          "caption":"Image Alt Text",
          "description":"Enter alternative text for the cover image",
          "description_is_code":"0",
          "inputTV":"",
          "inputTVtype":"textfield",
          "validation":"",
          "configs":"",
          "restrictive_condition":"",
          "display":"",
          "sourceFrom":"config",
          "sources":"",
          "inputOptionValues":"",
          "default":"",
          "useDefaultIfEmpty":"0",
          "pos":4
        },
        {
          "MIGX_id":406,
          "field":"brochure_file",
          "caption":"Brochure File",
          "description":"Upload the brochure file (PDF recommended)",
          "description_is_code":"0",
          "inputTV":"",
          "inputTVtype":"file",
          "validation":"",
          "configs":"",
          "restrictive_condition":"",
          "display":"",
          "sourceFrom":"config",
          "sources":"",
          "inputOptionValues":"",
          "default":"",
          "useDefaultIfEmpty":"0",
          "pos":5
        }
      ],
      "pos":1
    }
  ],
  "contextmenus":"update||duplicate||publish||unpublish||remove",
  "actionbuttons":"addItem||import_from_package",
  "columnbuttons":"",
  "filters":"",
  "extended":{
    "migx_add":"Add Brochure",
    "disable_add_item":"",
    "add_items_directly":1,
    "formcaption":"",
    "update_win_title":"",
    "win_id":"catalogbrochure",
    "maxRecords":"",
    "addNewItemAt":"bottom",
    "media_source_id":1,
    "multiple_formtabs":"",
    "multiple_formtabs_label":"",
    "multiple_formtabs_field":"",
    "multiple_formtabs_optionstext":"",
    "multiple_formtabs_optionsvalue":"",
    "actionbuttonsperrow":4,
    "winbuttonslist":"",
    "extrahandlers":"this.handleColumnSwitch||this.publishObject||this.unpublishObject",
    "filtersperrow":4,
    "packageName":"catalog",
    "classname":"CatalogBrochure",
    "task":"",
    "getlistsort":"pos",
    "getlistsortdir":"asc",
    "sortconfig":"",
    "gridpagesize":"",
    "use_custom_prefix":"0",
    "prefix":"",
    "grid":"dragdrop",
    "gridload_mode":2,
    "check_resid":1,
    "check_resid_TV":"",
    "join_alias":"",
    "has_jointable":"no",
    "getlistwhere":"",
    "joins":"",
    "hooksnippets":"",
    "cmpmaincaption":"Catalog Brochures",
    "cmptabcaption":"Brochures",
    "cmptabdescription":"Manage downloadable brochures",
    "cmptabcontroller":"",
    "winbuttons":"",
    "onsubmitsuccess":"",
    "submitparams":""
  },
  "permissions":{
    "apiaccess":"",
    "view":"",
    "list":"",
    "save":"",
    "create":"",
    "remove":"",
    "delete":"",
    "publish":"",
    "unpublish":"",
    "viewdeleted":"",
    "viewunpublished":""
  },
  "fieldpermissions":"",
  "columns":[
    {
      "MIGX_id":1,
      "header":"ID",
      "dataIndex":"id",
      "width":60,
      "sortable":true,
      "show_in_grid":1,
      "customrenderer":"",
      "renderer":"",
      "clickaction":"",
      "selectorconfig":"",
      "renderchunktpl":"",
      "renderoptions":"",
      "editor":"",
      "pos":1
    },
    {
      "MIGX_id":2,
      "header":"Cover",
      "dataIndex":"image",
      "width":80,
      "sortable":"false",
      "show_in_grid":1,
      "customrenderer":"",
      "renderer":"this.renderImage",
      "clickaction":"",
      "selectorconfig":"",
      "renderchunktpl":"",
      "renderoptions":"",
      "editor":"",
      "pos":2
    },
    {
      "MIGX_id":3,
      "header":"Brochure Title",
      "dataIndex":"title",
      "width":200,
      "sortable":true,
      "show_in_grid":1,
      "customrenderer":"",
      "renderer":"",
      "clickaction":"",
      "selectorconfig":"",
      "renderchunktpl":"",
      "renderoptions":"",
      "editor":"this.textEditor"
    },
    {
      "MIGX_id":4,
      "header":"Description",
      "dataIndex":"introtext",
      "width":200,
      "sortable":"false",
      "show_in_grid":1,
      "customrenderer":"",
      "renderer":"this.renderRowbodyText",
      "clickaction":"",
      "selectorconfig":"",
      "renderchunktpl":"",
      "renderoptions":"",
      "editor":"",
      "pos":4
    },
    {
      "MIGX_id":5,
      "header":"File",
      "dataIndex":"brochure_file",
      "width":150,
      "sortable":"false",
      "show_in_grid":1,
      "customrenderer":"",
      "renderer":"this.renderFile",
      "clickaction":"",
      "selectorconfig":"",
      "renderchunktpl":"",
      "renderoptions":"",
      "editor":"",
      "pos":5
    },
    {
      "MIGX_id":6,
      "header":"Published",
      "dataIndex":"published",
      "width":80,
      "sortable":true,
      "show_in_grid":1,
      "customrenderer":"",
      "renderer":"this.renderClickCrossTick",
      "clickaction":"",
      "selectorconfig":"",
      "renderchunktpl":"",
      "renderoptions":"",
      "editor":"",
      "pos":6
    },
    {
      "MIGX_id":7,
      "header":"Position",
      "dataIndex":"pos",
      "width":80,
      "sortable":true,
      "show_in_grid":"0",
      "customrenderer":"",
      "renderer":"",
      "clickaction":"",
      "selectorconfig":"",
      "renderchunktpl":"",
      "renderoptions":"",
      "editor":"",
      "pos":7
    }
  ],
  "category":""
}

brands.config.xml - Add Items Directly fails.

{
  "formtabs":[
    {
      "MIGX_id":93,
      "caption":"Brand Details",
      "print_before_tabs":"0",
      "fields":[
        {
          "MIGX_id":397,
          "field":"name",
          "caption":"Brand Name",
          "description":"Enter the brand name",
          "description_is_code":"0",
          "inputTV":"",
          "inputTVtype":"textfield",
          "validation":"required",
          "configs":"",
          "restrictive_condition":"",
          "display":"",
          "sourceFrom":"config",
          "sources":"",
          "inputOptionValues":"",
          "default":"",
          "useDefaultIfEmpty":"0",
          "pos":1
        },
        {
          "MIGX_id":398,
          "field":"logo",
          "caption":"Brand Logo",
          "description":"Upload the brand logo",
          "description_is_code":"0",
          "inputTV":"",
          "inputTVtype":"image",
          "validation":"",
          "configs":"",
          "restrictive_condition":"",
          "display":"",
          "sourceFrom":"config",
          "sources":"",
          "inputOptionValues":"",
          "default":"",
          "useDefaultIfEmpty":"0",
          "pos":2
        }
      ],
      "pos":1
    }
  ],
  "contextmenus":"update||duplicate||publish||unpublish||remove",
  "actionbuttons":"addItem||import_from_package",
  "columnbuttons":"",
  "filters":"",
  "extended":{
    "migx_add":"Add Brand",
    "disable_add_item":"",
    "add_items_directly":1,
    "formcaption":"",
    "update_win_title":"",
    "win_id":"catalogbrand",
    "maxRecords":"",
    "addNewItemAt":"bottom",
    "media_source_id":1,
    "multiple_formtabs":"",
    "multiple_formtabs_label":"",
    "multiple_formtabs_field":"",
    "multiple_formtabs_optionstext":"",
    "multiple_formtabs_optionsvalue":"",
    "actionbuttonsperrow":4,
    "winbuttonslist":"",
    "extrahandlers":"this.handleColumnSwitch||this.publishObject||this.unpublishObject",
    "filtersperrow":4,
    "packageName":"catalog",
    "classname":"CatalogBrand",
    "task":"",
    "getlistsort":"pos",
    "getlistsortdir":"asc",
    "sortconfig":"",
    "gridpagesize":"",
    "use_custom_prefix":"0",
    "prefix":"",
    "grid":"dragdrop",
    "gridload_mode":2,
    "check_resid":1,
    "check_resid_TV":"",
    "join_alias":"",
    "has_jointable":"no",
    "getlistwhere":"",
    "joins":"",
    "hooksnippets":"",
    "cmpmaincaption":"Catalog Brands",
    "cmptabcaption":"Brands",
    "cmptabdescription":"Manage product brands",
    "cmptabcontroller":"",
    "winbuttons":"",
    "onsubmitsuccess":"",
    "submitparams":""
  },
  "permissions":{
    "apiaccess":"",
    "view":"",
    "list":"",
    "save":"",
    "create":"",
    "remove":"",
    "delete":"",
    "publish":"",
    "unpublish":"",
    "viewdeleted":"",
    "viewunpublished":""
  },
  "fieldpermissions":"",
  "columns":[
    {
      "MIGX_id":1,
      "header":"ID",
      "dataIndex":"id",
      "width":60,
      "sortable":true,
      "show_in_grid":1,
      "customrenderer":"",
      "renderer":"",
      "clickaction":"",
      "selectorconfig":"",
      "renderchunktpl":"",
      "renderoptions":"",
      "editor":"",
      "pos":1
    },
    {
      "MIGX_id":2,
      "header":"Brand Name",
      "dataIndex":"name",
      "width":200,
      "sortable":true,
      "show_in_grid":1,
      "customrenderer":"",
      "renderer":"",
      "clickaction":"",
      "selectorconfig":"",
      "renderchunktpl":"",
      "renderoptions":"",
      "editor":"this.textEditor"
    },
    {
      "MIGX_id":3,
      "header":"Logo Path",
      "dataIndex":"logo",
      "width":150,
      "sortable":true,
      "show_in_grid":1,
      "customrenderer":"",
      "renderer":"",
      "clickaction":"",
      "selectorconfig":"",
      "renderchunktpl":"",
      "renderoptions":"",
      "editor":"",
      "pos":3
    },
    {
      "MIGX_id":4,
      "header":"Published",
      "dataIndex":"published",
      "width":80,
      "sortable":true,
      "show_in_grid":1,
      "customrenderer":"",
      "renderer":"this.renderClickCrossTick",
      "clickaction":"",
      "selectorconfig":"",
      "renderchunktpl":"",
      "renderoptions":"",
      "editor":"",
      "pos":4
    },
    {
      "MIGX_id":5,
      "header":"Position",
      "dataIndex":"pos",
      "width":80,
      "sortable":true,
      "show_in_grid":"0",
      "customrenderer":"",
      "renderer":"",
      "clickaction":"",
      "selectorconfig":"",
      "renderchunktpl":"",
      "renderoptions":"",
      "editor":"",
      "pos":5
    }
  ],
  "category":""
}

It seems that the validation is the problem.

When I test it and click the “Add Brand” button, an AJAX-request gets generated (action = mgr/migxdb/update) that returns the following:

{"success":false,"message":"Brand Name: required<br\/>","total":0,"data":[],"object":[]}

Genius - removing the required validation from the brand name field resolves the issue. Thank you.

Out of interest, is there anything that can be adjusted to allow Add Items Directly to work with the Brand Name field being required?

Also, on pageload the CMP logs the following errors

[2025-09-25 15:00:52] (ERROR @ /home/runcloud/webapps/dev_website_com/httpdocs/core/cache/mgr/smarty/default/d304d7c24d4d66df3bb18044c10cce45df1ab45b_0.file.dragdrop.grid.tpl.php : 37) PHP warning: Undefined array key "gridpagesize"
[2025-09-25 15:00:52] (ERROR @ /home/runcloud/webapps/dev_website_com/httpdocs/core/cache/mgr/smarty/default/d304d7c24d4d66df3bb18044c10cce45df1ab45b_0.file.dragdrop.grid.tpl.php : 290) PHP warning: Undefined array key "autoResourceFolders"
[2025-09-25 15:00:52] (ERROR @ /home/runcloud/webapps/dev_website_com/httpdocs/core/cache/mgr/smarty/default/d304d7c24d4d66df3bb18044c10cce45df1ab45b_0.file.dragdrop.grid.tpl.php : 376) PHP warning: Undefined array key "jsonvarkey"
[2025-09-25 15:00:52] (ERROR @ /home/runcloud/webapps/dev_website_com/httpdocs/core/cache/mgr/smarty/default/d304d7c24d4d66df3bb18044c10cce45df1ab45b_0.file.dragdrop.grid.tpl.php : 432) PHP warning: Undefined array key "iframeWindowTitle"
[2025-09-25 15:00:52] (ERROR @ /home/runcloud/webapps/dev_website_com/httpdocs/core/cache/mgr/smarty/default/eb4cb204a3bdaefeeca3355ab5036698039bd9ca_0.file.gridpanel.tpl.php : 69) PHP warning: Undefined array key "customHandlers"
[2025-09-25 15:00:52] (ERROR @ /home/runcloud/webapps/dev_website_com/httpdocs/core/cache/mgr/smarty/default/eb4cb204a3bdaefeeca3355ab5036698039bd9ca_0.file.gridpanel.tpl.php : 69) PHP warning: Attempt to read property "value" on null

And the following after selecting the Add Item button. connector.php returns success.

[2025-09-25 15:01:08] (ERROR @ /home/runcloud/webapps/dev_website_com/httpdocs/core/components/migx/processors/mgr/default/update.php : 320) PHP warning: Undefined array key "publishedon"
[2025-09-25 15:01:08] (ERROR @ /home/runcloud/webapps/dev_website_com/httpdocs/core/components/migx/processors/mgr/default/update.php : 321) PHP warning: Undefined array key "publishedon"

Where should I be looking to resolve these?

I believe if you give the “Brand Name” a default value (as you did with “Brochure Title”), then the ‘required’ validation should work.


These are all just warnings. PHP 8 creates a lot more warnings than PHP 7.4 did.

The code of the file core/components/migx/processors/mgr/default/update.php has to be changed on line 320, to not access an array-element without checking first, if an element with that key exists.

Perfect - thanks again.

This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.