We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36722
    • 101 Posts
    Shawn Himelberger Reply #1, 9 years ago
    I'm on MODX 2.3.3 Using MIGX 2.9

    I started by following this guide.
    http://rtfm.modx.com/extras/revo/migxdb/migxdb.tutorials/migxdb.manage-events-resources-in-a-cmp-with-help-of-migxdb

    I realized I was missing a getTVcombo.php file as well, but I figured that out.

    I'm actually super excited to get this far. However, for some reason when I save, they are not saving properly, and when I click "Add New" there is a resource with no title created at the root level.

    In the MODx Error log I see a bunch of
    [2015-03-16 10:28:47] (ERROR @ /mnt/target03/358650/950072/www.nhedcommoncore.com/web/content/core/model/modx/modconnectorresponse.class.php : 145) PHP warning: Cannot modify header information - headers already sent by (output started at /mnt/target03/358650/950072/www.nhedcommoncore.com/web/content/core/components/migx/configs/grid/grid.editors.inc.php:77)


    http://quick.as/qAyJcBkZ6 Here is a quick screencast of it, it's cuts off abruptly as my limit ran out.. DOH!

      Shawn Himmelberger
      Himmelberger Design
      https://himmdesign.com/services/website-development/modx"" target="_blank" rel="nofollow"> MODx Web Design | https://himmdesign.com/services/website-development/modx"" target="_blank" rel="nofollow"> MODx Web Development
      • 4172
      • 5,888 Posts
      not sure, if this will solve your issue with not saving, but it should solve this
      error in the error-log.

      try 2.9.2 from github
      https://github.com/Bruno17/MIGX/tree/master/packages
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 36722
        • 101 Posts
        Shawn Himelberger Reply #3, 9 years ago
        @Bruno Thanks, I installed. And it looks like I have a new set of errors now.
         [2015-03-16 12:22:50] (ERROR @ /connectors/modx.config.js.php) Error caching action map mgr/actions
        [2015-03-16 12:22:51] (ERROR @ /assets/components/migx/connector.php) Path specified for package migxresourceevents is not a valid or accessible directory: /mnt/target03/358650/950072/www.nhedcommoncore.com/web/content/core/components/migxresourceevents/model/
        [2015-03-16 12:22:57] (ERROR @ /assets/components/migx/connector.php) Path specified for package migxresourceevents is not a valid or accessible directory: /mnt/target03/358650/950072/www.nhedcommoncore.com/web/content/core/components/migxresourceevents/model/
        [2015-03-16 12:22:57] (ERROR @ /assets/components/migx/connector.php) modResource: Attempt to set NOT NULL field publishedon to NULL
        [2015-03-16 12:22:57] (ERROR @ /assets/components/migx/connector.php) Resource URI  already exists for resource id = 83; skipping duplicate resource URI for resource id = 84
        [2015-03-16 12:22:57] (ERROR @ /assets/components/migx/connector.php) Resource URI  already exists for resource id = 83; skipping duplicate resource URI for resource id = 85
        [2015-03-16 12:22:57] (ERROR @ /assets/components/migx/connector.php) Path specified for package migxresourceevents is not a valid or accessible directory: /mnt/target03/358650/950072/www.nhedcommoncore.com/web/content/core/components/migxresourceevents/model/
        [2015-03-16 12:23:01] (ERROR @ /assets/components/migx/connector.php) Path specified for package migxresourceevents is not a valid or accessible directory: /mnt/target03/358650/950072/www.nhedcommoncore.com/web/content/core/components/migxresourceevents/model/
        [2015-03-16 12:23:06] (ERROR @ /assets/components/migx/connector.php) Path specified for package migxresourceevents is not a valid or accessible directory: /mnt/target03/358650/950072/www.nhedcommoncore.com/web/content/core/components/migxresourceevents/model/
        [2015-03-16 12:23:07] (ERROR @ /assets/components/migx/connector.php) Resource URI  already exists for resource id = 83; skipping duplicate resource URI for resource id = 84
        [2015-03-16 12:23:07] (ERROR @ /assets/components/migx/connector.php) Resource URI  already exists for resource id = 83; skipping duplicate resource URI for resource id = 85
        [2015-03-16 12:23:07] (ERROR @ /assets/components/migx/connector.php) Path specified for package migxresourceevents is not a valid or accessible directory: /mnt/target03/358650/950072/www.nhedcommoncore.com/web/content/core/components/migxresourceevents/model/
        [2015-03-16 12:23:11] (ERROR @ /assets/components/migx/connector.php) Path specified for package migxresourceevents is not a valid or accessible directory: /mnt/target03/358650/950072/www.nhedcommoncore.com/web/content/core/components/migxresourceevents/model/
          Shawn Himmelberger
          Himmelberger Design
          https://himmdesign.com/services/website-development/modx"" target="_blank" rel="nofollow"> MODx Web Design | https://himmdesign.com/services/website-development/modx"" target="_blank" rel="nofollow"> MODx Web Development
          • 4172
          • 5,888 Posts
          does the folders

          core/components/migxresourceevents/

          and

          core/components/migxresourceevents/model/

          exist?
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 36722
            • 101 Posts
            Shawn Himelberger Reply #5, 9 years ago
            They didn't until last night, I had one our other guys working on it some, using the Child Resources package as an example.

            I wonder if you could make a package of a working Resource Events example?

              Shawn Himmelberger
              Himmelberger Design
              https://himmdesign.com/services/website-development/modx"" target="_blank" rel="nofollow"> MODx Web Design | https://himmdesign.com/services/website-development/modx"" target="_blank" rel="nofollow"> MODx Web Development
              • 36722
              • 101 Posts
              Shawn Himelberger Reply #6, 9 years ago
              Actually, whatever our other developer has been doing got it working to save information. Only thing now is when we add a new event, it just creates an untitled document in the root.
                Shawn Himmelberger
                Himmelberger Design
                https://himmdesign.com/services/website-development/modx"" target="_blank" rel="nofollow"> MODx Web Design | https://himmdesign.com/services/website-development/modx"" target="_blank" rel="nofollow"> MODx Web Development
                • 4172
                • 5,888 Posts
                can you post an export of your current MIGX-configuration?
                  -------------------------------

                  you can buy me a beer, if you like MIGX

                  http://webcmsolutions.de/migx.html

                  Thanks!
                  • 36722
                  • 101 Posts
                  Shawn Himelberger Reply #8, 9 years ago
                  {
                    "formtabs":[
                      {
                        "MIGX_id":1,
                        "caption":"Event",
                        "print_before_tabs":"0",
                        "fields":[
                          {
                            "MIGX_id":1,
                            "field":"pagetitle",
                            "caption":"Title",
                            "description":"",
                            "description_is_code":"0",
                            "inputTV":"",
                            "inputTVtype":"",
                            "validation":"",
                            "configs":"",
                            "restrictive_condition":"",
                            "display":"",
                            "sourceFrom":"config",
                            "sources":"",
                            "inputOptionValues":"",
                            "default":"",
                            "useDefaultIfEmpty":"0",
                            "pos":1
                          },
                          {
                            "MIGX_id":2,
                            "field":"cc_resource_location",
                            "caption":"Location",
                            "description":"",
                            "description_is_code":"0",
                            "inputTV":"cc_resource_location",
                            "inputTVtype":"",
                            "validation":"",
                            "configs":"",
                            "restrictive_condition":"",
                            "display":"",
                            "sourceFrom":"config",
                            "sources":"",
                            "inputOptionValues":"",
                            "default":"",
                            "useDefaultIfEmpty":"0",
                            "pos":2
                          },
                          {
                            "MIGX_id":3,
                            "field":"cc_resource_date",
                            "caption":"Start",
                            "description":"",
                            "description_is_code":"0",
                            "inputTV":"cc_resource_date",
                            "inputTVtype":"",
                            "validation":"",
                            "configs":"",
                            "restrictive_condition":"",
                            "display":"",
                            "sourceFrom":"config",
                            "sources":"",
                            "inputOptionValues":"",
                            "default":"",
                            "useDefaultIfEmpty":"0",
                            "pos":3
                          },
                          {
                            "MIGX_id":4,
                            "field":"cc_resource_date_end",
                            "caption":"End",
                            "description":"",
                            "description_is_code":"0",
                            "inputTV":"cc_resource_date_end",
                            "inputTVtype":"",
                            "validation":"",
                            "configs":"",
                            "restrictive_condition":"",
                            "display":"",
                            "sourceFrom":"config",
                            "sources":"",
                            "inputOptionValues":"",
                            "default":"",
                            "useDefaultIfEmpty":"0",
                            "pos":4
                          },
                          {
                            "MIGX_id":5,
                            "field":"template",
                            "caption":"",
                            "description":"",
                            "description_is_code":"0",
                            "inputTV":"",
                            "inputTVtype":"",
                            "validation":"",
                            "configs":"",
                            "restrictive_condition":"",
                            "display":"none",
                            "sourceFrom":"config",
                            "sources":"",
                            "inputOptionValues":"",
                            "default":"",
                            "useDefaultIfEmpty":"0",
                            "pos":5
                          },
                          {
                            "MIGX_id":6,
                            "field":"parent",
                            "caption":"",
                            "description":"",
                            "description_is_code":"0",
                            "inputTV":"",
                            "inputTVtype":"",
                            "validation":"",
                            "configs":"",
                            "restrictive_condition":"",
                            "display":"none",
                            "sourceFrom":"config",
                            "sources":"",
                            "inputOptionValues":"",
                            "default":13,
                            "useDefaultIfEmpty":"0",
                            "pos":6
                          },
                          {
                            "MIGX_id":7,
                            "field":"context_key",
                            "caption":"",
                            "description":"",
                            "description_is_code":"0",
                            "inputTV":"",
                            "inputTVtype":"",
                            "validation":"",
                            "configs":"",
                            "restrictive_condition":"",
                            "display":"none",
                            "sourceFrom":"config",
                            "sources":"",
                            "inputOptionValues":"",
                            "default":"web",
                            "useDefaultIfEmpty":"0",
                            "pos":7
                          }
                        ],
                        "pos":1
                      },
                      {
                        "MIGX_id":2,
                        "caption":"Content",
                        "print_before_tabs":"0",
                        "fields":[
                          {
                            "MIGX_id":8,
                            "field":"content",
                            "caption":"Content",
                            "description":"",
                            "description_is_code":"0",
                            "inputTV":"",
                            "inputTVtype":"richtext",
                            "validation":"",
                            "configs":"",
                            "restrictive_condition":"",
                            "display":"",
                            "sourceFrom":"config",
                            "sources":"",
                            "inputOptionValues":"",
                            "default":"",
                            "useDefaultIfEmpty":"0",
                            "pos":1
                          }
                        ],
                        "pos":2
                      }
                    ],
                    "contextmenus":"update||remove",
                    "actionbuttons":"addItem||toggletrash",
                    "columnbuttons":"update||publish||unpublish||recall_remove_delete",
                    "filters":[
                      {
                        "MIGX_id":1,
                        "name":"eventsfilter",
                        "label":"eventsfilter",
                        "emptytext":"-- Filter Events --",
                        "type":"combobox",
                        "getlistwhere":"[[migxFilterevents]]",
                        "getcomboprocessor":"getTVcombo",
                        "combotextfield":"eventsfiltercombo",
                        "comboidfield":"",
                        "comboparent":"",
                        "default":""
                      }
                    ],
                    "extended":{
                      "migx_add":"Add Event",
                      "disable_add_item":"",
                      "add_items_directly":1,
                      "formcaption":"Event",
                      "update_win_title":"",
                      "win_id":"events",
                      "maxRecords":"",
                      "addNewItemAt":"top",
                      "multiple_formtabs":"",
                      "multiple_formtabs_label":"",
                      "multiple_formtabs_field":"",
                      "multiple_formtabs_optionstext":"",
                      "multiple_formtabs_optionsvalue":"",
                      "actionbuttonsperrow":4,
                      "winbuttonslist":"",
                      "extrahandlers":"",
                      "filtersperrow":4,
                      "packageName":"migxresourceevents",
                      "classname":"modResource",
                      "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":{
                        "parent":13
                      },
                      "joins":"",
                      "hooksnippets":"",
                      "cmpmaincaption":"Events",
                      "cmptabcaption":"Events",
                      "cmptabdescription":"Manage your events here",
                      "cmptabcontroller":"",
                      "winbuttons":"",
                      "onsubmitsuccess":"",
                      "submitparams":""
                    },
                    "columns":[
                      {
                        "MIGX_id":1,
                        "header":"ID",
                        "dataIndex":"id",
                        "width":10,
                        "renderer":"",
                        "sortable":true,
                        "show_in_grid":1
                      },
                      {
                        "MIGX_id":2,
                        "header":"Pagetitle",
                        "dataIndex":"pagetitle",
                        "width":30,
                        "renderer":"this.renderRowActions",
                        "sortable":true,
                        "show_in_grid":1
                      },
                      {
                        "MIGX_id":7,
                        "header":"Location",
                        "dataIndex":"cc_resource_location",
                        "width":20,
                        "renderer":"",
                        "sortable":"false",
                        "show_in_grid":1
                      },
                      {
                        "MIGX_id":5,
                        "header":"Start",
                        "dataIndex":"cc_resource_date",
                        "width":20,
                        "renderer":"this.renderDate",
                        "sortable":true,
                        "show_in_grid":1
                      },
                      {
                        "MIGX_id":6,
                        "header":"End",
                        "dataIndex":"cc_resource_date_end",
                        "width":20,
                        "renderer":"this.renderDate",
                        "sortable":true,
                        "show_in_grid":1
                      },
                      {
                        "MIGX_id":4,
                        "header":"Published",
                        "dataIndex":"published",
                        "width":10,
                        "renderer":"this.renderCrossTick",
                        "sortable":"false",
                        "show_in_grid":1
                      },
                      {
                        "MIGX_id":3,
                        "header":"",
                        "dataIndex":"deleted",
                        "width":"",
                        "renderer":"",
                        "sortable":"false",
                        "show_in_grid":"0"
                      }
                    ]
                  }
                    Shawn Himmelberger
                    Himmelberger Design
                    https://himmdesign.com/services/website-development/modx"" target="_blank" rel="nofollow"> MODx Web Design | https://himmdesign.com/services/website-development/modx"" target="_blank" rel="nofollow"> MODx Web Development
                    • 4172
                    • 5,888 Posts
                    your problem is:

                    "add_items_directly":1,


                    this should be:

                    "add_items_directly":0,


                    you need the modal-window before saving in that case, because we set the default-parent in it.

                    Otherwise you would need to customize the update-processor and set the default-parent there.
                      -------------------------------

                      you can buy me a beer, if you like MIGX

                      http://webcmsolutions.de/migx.html

                      Thanks!
                      • 43568
                      • 9 Posts
                      Quote from: Bruno17 at Mar 17, 2015, 05:06 AM
                      does the folders

                      core/components/migxresourceevents/

                      and

                      core/components/migxresourceevents/model/

                      exist?

                      Dear Bruno17,

                      I think I'm running into the same problem, but unfortunaly I don't have a guy working on it over night and managing to get these directories to exist ;-)

                      I followed your MIGXdb sample (events).

                      My sample does not save anything, even no empty entries. In the manager-errorlog I get this entry:
                      Path specified for package migxresourceevent is not a valid or accessible directory: /..../modx/core/components/migxresourceevent/model/

                      do I need an extra to make this sample work (migxresourceevents), like migxchildresources ?

                      TIA

                      Marc