<![CDATA[ Add Item works, but can't delete or edit entry -> TypeError: rec is undefined - My Forums]]> https://forums.modx.com/thread/?thread=104830 <![CDATA[Add Item works, but can't delete or edit entry -> TypeError: rec is undefined]]> https://forums.modx.com/thread/104830/add-item-works-but-can-t-delete-or-edit-entry---typeerror-rec-is-undefined#dis-post-563708 I recovered a version of a page with "VersionX". Frontend and backend are looking correct. But after the recoveery I wasn't able to edit or delete entries of the template variables migx list anymore. The debugger says "TypeError: rec is undefined". I hope somebody can help me. I tried to delete the database field with the entries, but without result.
Attached is the error message and the code lines with the error. Here is the configuration:

{
  "formtabs":[
    {
      "MIGX_id":4,
      "caption":"Programm-Elemente",
      "print_before_tabs":"0",
      "fields":[
        {
          "MIGX_id":10,
          "field":"programm_title",
          "caption":"Titel",
          "description":"",
          "description_is_code":"0",
          "inputTV":"programm_title",
          "inputTVtype":"text",
          "validation":"",
          "configs":"",
          "restrictive_condition":"",
          "display":"",
          "sourceFrom":"config",
          "sources":"",
          "inputOptionValues":"",
          "default":"",
          "useDefaultIfEmpty":"0",
          "pos":1
        },
        {
          "MIGX_id":11,
          "field":"programm_text",
          "caption":"Aussage",
          "description":"",
          "description_is_code":"0",
          "inputTV":"programm_text",
          "inputTVtype":"text",
          "validation":"",
          "configs":"",
          "restrictive_condition":"",
          "display":"",
          "sourceFrom":"config",
          "sources":"",
          "inputOptionValues":"",
          "default":"",
          "useDefaultIfEmpty":"0",
          "pos":2
        }
      ],
      "pos":1
    }
  ],
  "contextmenus":"update||remove",
  "actionbuttons":"",
  "columnbuttons":"update||remove",
  "filters":"",
  "extended":{
    "migx_add":"Programmpunkt hinzuf\u00fcgen",
    "disable_add_item":"",
    "add_items_directly":1,
    "formcaption":"",
    "update_win_title":"",
    "win_id":"programm_items",
    "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":"",
    "classname":"",
    "task":"",
    "getlistsort":"",
    "getlistsortdir":"",
    "sortconfig":"",
    "gridpagesize":"",
    "use_custom_prefix":"0",
    "prefix":"",
    "grid":"",
    "gridload_mode":1,
    "check_resid":1,
    "check_resid_TV":"",
    "join_alias":"",
    "has_jointable":"yes",
    "getlistwhere":"",
    "joins":"",
    "hooksnippets":"",
    "cmpmaincaption":"",
    "cmptabcaption":"",
    "cmptabdescription":"",
    "cmptabcontroller":"",
    "winbuttons":"",
    "onsubmitsuccess":"",
    "submitparams":""
  },
  "columns":[
    {
      "MIGX_id":3,
      "header":"Id",
      "dataIndex":"MIGX_id",
      "width":10,
      "sortable":"false",
      "show_in_grid":1,
      "customrenderer":"",
      "renderer":"",
      "clickaction":"",
      "selectorconfig":"",
      "renderchunktpl":"",
      "renderoptions":"",
      "editor":""
    },
    {
      "MIGX_id":1,
      "header":"Programmpunkt",
      "dataIndex":"programm_title",
      "width":50,
      "sortable":"false",
      "show_in_grid":1,
      "customrenderer":"",
      "renderer":"",
      "clickaction":"",
      "selectorconfig":"",
      "renderchunktpl":"",
      "renderoptions":"",
      "editor":""
    },
    {
      "MIGX_id":2,
      "header":"Aussage",
      "dataIndex":"programm_text",
      "width":"",
      "sortable":"false",
      "show_in_grid":1,
      "customrenderer":"",
      "renderer":"",
      "clickaction":"",
      "selectorconfig":"",
      "renderchunktpl":"",
      "renderoptions":"",
      "editor":""
    }
  ],
  "category":""
}
]]>
winfomatic Jan 21, 2019, 07:18 PM https://forums.modx.com/thread/104830/add-item-works-but-can-t-delete-or-edit-entry---typeerror-rec-is-undefined#dis-post-563708
<![CDATA[Re: Add Item works, but can't delete or edit entry -> TypeError: rec is undefined (Best Answer)]]> https://forums.modx.com/thread/104830/add-item-works-but-can-t-delete-or-edit-entry---typeerror-rec-is-undefined#dis-post-563728
After editing the config and disabled all context menu and column buttons, it's working.

See changes in attached pics.
Before (not working)
  
  "contextmenus":"update||remove",
  "actionbuttons":"",
  "columnbuttons":"update||remove",

After
  
  "contextmenus":"",
  "actionbuttons":"",
  "columnbuttons":"",
 
]]>
winfomatic Jan 23, 2019, 06:00 PM https://forums.modx.com/thread/104830/add-item-works-but-can-t-delete-or-edit-entry---typeerror-rec-is-undefined#dis-post-563728