We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37108
    • 80 Posts
    I reach out after trying to resolve this issue in numerous ways. When first adding an item, all seems to go as expected; the record is created in the database with the expected values and it shows up in the TV grid. However, when editing an item in the grid, none of the saved values show (I have a listbox and richtext field) and when pressing "done" to save (whether or not changes are made), the "quip.thread_err_ns" error popup appears. This seems to indicate that the object_id is not being found for some reason.

    To test whether other components or something else in the current modx install (modx 2.7, migx 2.12) could be causing a problem, I added a MIGXdb package from another site that I know to be working (also running the same versions of modx and migx). That package works as expected. I've looked at the configs over and over and just am not seeing the bug. Please take a look and hopefully another set of eyes will see where I'm going wrong. Here's the current schema and config:

    <?xml version="1.0" encoding="UTF-8"?>
    
    <model package="takomaawards" baseClass="xPDOObject" platform="mysql" defaultEngine="MyISAM" phpdoc-package="takomaawards" phpdoc-subpackage="model" version="1.1">
    
        <object class="takomaAwardsCategories" table="takomaAwards_categories" extends="xPDOSimpleObject">
    
            <field key="award_category" dbtype="smallint" precision="4" attributes="unsigned" phptype="integer" null="false" default="0" />
            <field key="award_category_description" dbtype="text" phptype="string" index="fulltext" />
    
            <field key="resource_id" dbtype="int" precision="11" phptype="integer" null="false" default="" />
            
            <aggregate alias="Resource" class="modResource" local="resource_id" foreign="id" cardinality="one" owner="foreign" />
        </object>
    
    </model>
    


    {
      "formtabs":[
        {
          "MIGX_id":1,
          "caption":"Award Category and Nominee List",
          "print_before_tabs":"0",
          "fields":[
            {
              "MIGX_id":1,
              "field":"award_category",
              "caption":"Category",
              "description":"",
              "description_is_code":"0",
              "inputTV":"",
              "inputTVtype":"listbox",
              "validation":"",
              "configs":"",
              "restrictive_condition":"",
              "display":"",
              "sourceFrom":"tv",
              "sources":"",
              "inputOptionValues":"||Test One==1||Test Two==2",
              "default":"",
              "useDefaultIfEmpty":"0",
              "pos":1
            },
            {
              "MIGX_id":2,
              "field":"award_category_description",
              "caption":"Category Description",
              "description":"",
              "description_is_code":"0",
              "inputTV":"",
              "inputTVtype":"richtext",
              "validation":"",
              "configs":"",
              "restrictive_condition":"",
              "display":"",
              "sourceFrom":"tv",
              "sources":"",
              "inputOptionValues":"",
              "default":"",
              "useDefaultIfEmpty":"0",
              "pos":2
            }
          ],
          "pos":1
        }
      ],
      "contextmenus":"update||remove",
      "actionbuttons":"addItem",
      "columnbuttons":"",
      "filters":"",
      "extended":{
        "migx_add":"Add Award Category",
        "disable_add_item":"",
        "add_items_directly":"",
        "formcaption":"Award Categories and Nominees",
        "update_win_title":"Award Category",
        "win_id":"awards_categories",
        "maxRecords":"",
        "addNewItemAt":"bottom",
        "media_source_id":"",
        "multiple_formtabs":"",
        "multiple_formtabs_label":"",
        "multiple_formtabs_field":"",
        "multiple_formtabs_optionstext":"",
        "multiple_formtabs_optionsvalue":"",
        "actionbuttonsperrow":4,
        "winbuttonslist":"",
        "extrahandlers":"",
        "filtersperrow":4,
        "packageName":"takomaawards",
        "classname":"takomaAwardsCategories",
        "task":"",
        "getlistsort":"",
        "getlistsortdir":"",
        "sortconfig":"",
        "gridpagesize":"",
        "use_custom_prefix":"0",
        "prefix":"",
        "grid":"",
        "gridload_mode":2,
        "check_resid":1,
        "check_resid_TV":"",
        "join_alias":"",
        "has_jointable":"no",
        "getlistwhere":"",
        "joins":"",
        "hooksnippets":"",
        "cmpmaincaption":"",
        "cmptabcaption":"",
        "cmptabdescription":"",
        "cmptabcontroller":"",
        "winbuttons":"",
        "onsubmitsuccess":"",
        "submitparams":""
      },
      "columns":[
        {
          "MIGX_id":2,
          "header":"Category",
          "dataIndex":"award_category",
          "width":"",
          "sortable":true,
          "show_in_grid":1,
          "customrenderer":"",
          "renderer":"",
          "clickaction":"",
          "selectorconfig":"",
          "renderchunktpl":"",
          "renderoptions":"",
          "editor":""
        }
      ],
      "category":""
    }
    


    Thanks for taking a look!

    This question has been answered by smg6511v2. See the first response.

    [ed. note: smg6511v2 last edited this post 5 years, 4 months ago.]
    • discuss.answer
      • 37108
      • 80 Posts
      OK, I could've sworn I tried this already but it turns out the issue was caused by not having the "id" field included in the columns tab. Once I added this field in the configuration, all began to work properly. The id does not however have to be shown in the grid.

      It would be nice if

      • The object_id were passed/accessed in a way that doesn't require adding the id field in the columns tab,
      • Validation were provided within migx itself that alerts a user when leaving the columns tab without entering the id (or at least triggers a warning/error in the modx logs), or
      • The id were added by default

      Just putting the idea out there, realizing that Bruno has no doubt put countless hours into creating and maintaining this terrific component without compensation.