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

    To start I am using Revo2.29 and have migx working on the single file upload from this tutorial http://www.youtube.com/watch?v=dE9-oZCqy9o

    I have followed the tutorial here http://rtfm.modx.com/extras/revo/migx/migx.tutorials/migx.use-resource-specific-mediasource-and-multifile-uploader

    There are quite a few things wrong such as when the box shows up on the resource only title is shown no image column and adding images has a number of errors.

    I have gone over the tutorial and what I notice is on the step Go to: Components->MIGX->Tab: MIGX Right-click on the new configuration and select 'import/export'
    Copy/paste this code into the textarea:

    When I copy the Json into the text area and click done when I go back and look at it instead of seeing what I pasted there I see this

    {"formtabs":"Array","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":"Array"}


    Is that meant to happen or could this be my issue.

    Cheers

    Ian [ed. note: ianman last edited this post 13 years, 1 month ago.]
      • 38547
      • 98 Posts
      Looks like I am doing something wrong somewhere.

      Just an idea but if anyone can turn this:

      http://rtfm.modx.com/extras/revo/migx/migx.tutorials/migx.use-resource-specific-mediasource-and-multifile-uploader

      into a video tutorial as per this migx tutorial http://www.youtube.com/watch?v=dE9-oZCqy9o
      then that would be damn handy

      Cheers
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        There is a problem with entering JSON into the import configurations field. I'm not sure exactly what the problem is, but Bruno has solved it for me a couple of times. In the case of this tutorial, he gave me new JSON code to paste in, and it works - something about stray quote marks. I edited the tutorial to use the JSON he gave me. [ed. note: sottwell last edited this post 13 years, 1 month ago.]
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 38547
          • 98 Posts
          Still not updating the Json thats in the box by default cant over-write it or delete it at a loss

          Cheers

          Ian
          [ed. note: ianman last edited this post 13 years, 1 month ago.]
            • 38547
            • 98 Posts
            Have attached a screenshot of the text field with the Json in that I cant edit in case this sheds any light.

            Many thanks
              • 38547
              • 98 Posts
              I have made progress here's were I went wrong.

              Sotwell when you replied to this thread I think you may have added the old Json to the thread before updating the tutorial with the new code and deleting the old Json from this thread, however I got an email with your reply content so I copied the Json from that email, I have just been over the tutorial again and noticed the new code with the " all escaped with the \

              I have now used the updated json in the tutorial and things are now starting to work.

              Many thanks sorry for my confusion.
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                Indeed, your confusion most likely stems from my confusion. As much as I depend on MIGx, I still have only the most hazy understanding of how that works.
                  Studying MODX in the desert - http://sottwell.com
                  Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                  Join the Slack Community - http://modx.org
                  • 38547
                  • 98 Posts
                  I now have this working I have no understanding of how it works however its perfect must be done using some kind of magic or witchcraft.
                  I noticed on the tutorial page for this it showing the old Json code without the \ to escape the "

                  I have used the following which works amazing
                  {"formtabs":"[{\"MIGX_id\":\"1\",\"caption\":\"Image\",\"fields\":[{\"field\":\"title\",\"caption\":\"Title\",\"MIGX_id\":1},{\"MIGX_id\":\"2\",\"field\":\"image\",\"caption\":\"Image\",\"inputTV\":\"\",\"inputTVtype\":\"image\",\"configs\":\"\",\"sourceFrom\":\"migx\",\"sources\":\"\",\"inputOptionValues\":\"\",\"default\":\"\"},{\"MIGX_id\":\"3\",\"field\":\"description\",\"caption\":\"Description\",\"inputTV\":\"\",\"inputTVtype\":\"\",\"configs\":\"\",\"sourceFrom\":\"config\",\"sources\":\"\",\"inputOptionValues\":\"\",\"default\":\"\"}]}]","contextmenus":"","actionbuttons":"upload||loadfromsource","columnbuttons":"","filters":"","extended":{"migx_add":"Add Image","formcaption":"Image","win_id":"resourcegallery","multiple_formtabs":"","packageName":"","classname":"","task":"","getlistsort":"","getlistsortdir":"","use_custom_prefix":"0","prefix":"","grid":"","gridload_mode":"1","check_resid":"1","check_resid_TV":"","join_alias":"","getlistwhere":"","joins":"","cmpmaincaption":"","cmptabcaption":"","cmptabdescription":"","cmptabcontroller":""},"columns":"[{\"MIGX_id\":\"1\",\"header\":\"ID\",\"dataIndex\":\"MIGX_id\",\"width\":\"10\",\"renderer\":\"\",\"sortable\":\"false\",\"show_in_grid\":\"1\"},{\"MIGX_id\":\"2\",\"header\":\"Title\",\"dataIndex\":\"title\",\"width\":\"20\",\"renderer\":\"\",\"sortable\":\"false\",\"show_in_grid\":\"1\"},{\"MIGX_id\":\"3\",\"header\":\"Image\",\"dataIndex\":\"image\",\"width\":\"20\",\"renderer\":\"this.renderImage\",\"sortable\":\"false\",\"show_in_grid\":\"1\"},{\"MIGX_id\":\"4\",\"header\":\"Deleted\",\"dataIndex\":\"deleted\",\"width\":\"10\",\"renderer\":\"this.renderCrossTick\",\"sortable\":\"false\",\"show_in_grid\":\"1\"}]"}


                  Cheers