We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37117
    • 24 Posts
    Hi!

    I'm trying to configure MIGX for multiple files upload from this tutorial http://rtfm.modx.com/extras/revo/migx/migx.tutorials/migx.use-resource-specific-mediasource-and-multifile-uploader but when I want to import JSON string to MIGX config tab this error occurs:

    http://i.imgur.com/LWLy6Pa.jpg

    Need help ;(
      • 3866 ☆ A M B ☆
      • 350 Posts
      I seem to be experiencing this problem suddenly and can no longer upload images via the Ajax Upload.

      When I try to view the code via Import/Export the following warning appears:

      Warning: Invalid argument supplied for foreach() in /home/site/public_html/core/components/migx/model/migx/migx.class.php on line 1757


      Currently using MODX 2.2.8 and MIGX 2.5.6

      This was working previously with MIGX 2.3.2 but then suddenly stopped, so upgraded to 2.5.6 but this hasn't fixed the problem.

      :(

      Below is my MIGX entry:

      {
        "formtabs":[
          {
            "MIGX_id":1,
            "caption":"Image",
            "print_before_tabs":"0",
            "fields":[
              {
                "MIGX_id":1,
                "field":"title",
                "caption":"Title",
                "description":"",
                "description_is_code":"0",
                "inputTV":"",
                "inputTVtype":"",
                "configs":"",
                "sourceFrom":"config",
                "sources":"[]",
                "inputOptionValues":"",
                "default":""
              },
              {
                "MIGX_id":2,
                "field":"image",
                "caption":"Image",
                "description":"",
                "description_is_code":"0",
                "inputTV":"",
                "inputTVtype":"image",
                "configs":"",
                "sourceFrom":"migx",
                "sources":"[]",
                "inputOptionValues":"",
                "default":""
              },
              {
                "MIGX_id":3,
                "field":"description",
                "caption":"Description",
                "description":"",
                "description_is_code":"0",
                "inputTV":"",
                "inputTVtype":"textarea",
                "configs":"",
                "sourceFrom":"config",
                "sources":"[]",
                "inputOptionValues":"",
                "default":""
              }
            ]
          }
        ],
        "contextmenus":"",
        "actionbuttons":"upload||loadfromsource",
        "columnbuttons":"",
        "filters":"[]",
        "extended":{
          "migx_add":"Add Image",
          "formcaption":"",
          "update_win_title":"",
          "win_id":"resourcegallery",
          "maxRecords":"",
          "multiple_formtabs":"",
          "extrahandlers":"",
          "packageName":"",
          "classname":"",
          "task":"",
          "getlistsort":"",
          "getlistsortdir":"",
          "use_custom_prefix":"0",
          "prefix":"",
          "grid":"",
          "gridload_mode":1,
          "check_resid":1,
          "check_resid_TV":"",
          "join_alias":"",
          "has_jointable":"yes",
          "getlistwhere":"",
          "joins":"",
          "cmpmaincaption":"",
          "cmptabcaption":"",
          "cmptabdescription":"",
          "cmptabcontroller":"",
          "winbuttons":"",
          "onsubmitsuccess":"",
          "submitparams":""
        },
        "columns":[
          {
            "MIGX_id":1,
            "header":"ID",
            "dataIndex":"MIGX_id",
            "width":20,
            "sortable":"false",
            "show_in_grid":1,
            "renderer":"",
            "clickaction":"",
            "selectorconfig":"",
            "renderoptions":"[]"
          },
          {
            "MIGX_id":2,
            "header":"Title",
            "dataIndex":"title",
            "width":20,
            "sortable":"false",
            "show_in_grid":1,
            "renderer":"",
            "clickaction":"",
            "selectorconfig":"",
            "renderoptions":"[]"
          },
          {
            "MIGX_id":3,
            "header":"Image",
            "dataIndex":"image",
            "width":20,
            "sortable":"false",
            "show_in_grid":1,
            "renderer":"this.renderImage",
            "clickaction":"",
            "selectorconfig":"",
            "renderoptions":"[]"
          },
          {
            "MIGX_id":4,
            "header":"Deleted",
            "dataIndex":"deleted",
            "width":10,
            "sortable":"false",
            "show_in_grid":1,
            "renderer":"this.renderCrossTick",
            "clickaction":"",
            "selectorconfig":"",
            "renderoptions":"[]"
          }
        ]
      }


      UPDATE: The UPLOAD button was being block by Firefox as its on a site with an SSL certificate and the upload is clearly not encrypted which is when the button did not appear. Allow blocked information and it works.

      Still getting error however, when viewing code in the MIGX Export/Import option [ed. note: boomerang last edited this post 13 years, 1 month ago.]
        Helen Warner
        Number one pixel!
        Proud to be linked with MODX at Crimson Pixel
        • 42766
        • 47 Posts
        This is years old, but for those playing at home, there's a fix being discussed here which worked for me: https://forums.modx.com/thread/97547/multi-upload-not-working