We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36932
    • 39 Posts
    Hello and in first place thank you for that plugin, it's a great addition do modX and I've been using it a lot lately.
    After the conversion of one site to 2.2, I wanted to use migX for a slideshow. The image tv I use is supposed to load images from a specific media source (actually it's just a subfolder of the assets directory). For the front-end this is working completely without a problem, but in the backend, I don't see the preview pictures for the images.

    The path used to the images in the backend is just missing the part pointing to the media source base directory. Is there any chance that I can fix this on my own? Is a patch coming for this?

    With kind regards,
    Marc
      • 4172
      • 5,888 Posts
      is your image-tv working correctly, if you use it outside of MIGX?

      what is the sourcecode(the image-part) of this image-TV:


      • in the grid
      • in the form
      • if you use it outside of MIGX
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 36932
        • 39 Posts
        Hello Bruno,

        thanks for your quick reply! After inspecting the situation again, I noticed that i missed the closing "/" for the basePath of the media source. Sorry, I'm pretty new to media sources. But your plugin still works like a charm.

        Still thanks a lot for your help!
          • 37729
          • 19 Posts
          Quote from: Bruno17 at Jan 10, 2012, 06:19 AM
          Quote from: toasteddigital at Jan 09, 2012, 04:05 AM
          Hi There,

          Is there a way to limit the amount of rows a user can add to a MIGx table? Or a way to prevent them adding more than x KB of data?

          My client has a fairly large site using MIGx, and the user is data entry happy, occasionally putting more data in than the system is capable of holding. What then happens is the database truncates the data and they get errors. MIGx is brilliantly useful, it'd just be great to stop them putting in more than they should be.

          They're not technical, so it'd be great if this could be implemented, I can potentially do this myself if given a nudge in the right direction. Apologies if this has already been asked or I'm missing something very simple smiley

          Environment:

          MODX Revolution 2.1.3-pl (traditional)
          MIGx 1.1.0
          PHP Version 5.3.8
          MySQL 5.1.56


          there isn't a way (yet) to limit the entries.

          No problem. Is it likely to be in the near future?
            • 25803 ☆ A M B ☆
            • 721 Posts
            I recently updated a site to 2.2.0 pl with MIGX 1.1.0 rc2 and I get this whenever I try to add or edit a MIGX item:

            Fatal error: Uncaught exception 'SmartyException' with message 'Unable to load template file 'element/tv/renders/input/richtext.tpl'' in /home/rx2/domains/collaborativemedia.ca/public_html/core/model/smarty/sysplugins/smarty_internal_template.php:162 Stack trace: #0 /home/rx2/domains/collaborativemedia.ca/public_html/core/model/smarty/sysplugins/smarty_internal_template.php(537): Smarty_Internal_Template->isExisting(true) #1 /home/rx2/domains/collaborativemedia.ca/public_html/core/model/smarty/Smarty.class.php(335): Smarty_Internal_Template->getRenderedTemplate() #2 /home/rx2/domains/collaborativemedia.ca/public_html/core/model/modx/modmanagercontroller.class.php(252): Smarty->fetch('element/tv/rend...') #3 /home/rx2/domains/collaborativemedia.ca/public_html/core/model/modx/modtemplatevar.class.php(1103): modManagerController->fetchTemplate('element/tv/rend...') #4 /home/rx2/domains/collaborativemedia.ca/public_html/core/model/modx/modtemplatevar.class.php(421): modTemplateVarInputRender->render('I have download...', Arra in /home/rx2/domains/collaborativemedia.ca/public_html/core/model/smarty/sysplugins/smarty_internal_template.php on line 162


            Before I update to the latest version of MIGX (though perhaps this isn't MIGX but I need to reinstall MODX, maybe missing a file?)

            Was this done:

            I think, I will add a upgrade-script which adds this MIGX-id field to all MIGX-TVs automatically.
              • 22840
              • 1,572 Posts
              Quote from: rx2 at Jan 19, 2012, 09:54 AM
              I recently updated a site to 2.2.0 pl with MIGX 1.1.0 rc2 and I get this whenever I try to add or edit a MIGX item:

              Fatal error: Uncaught exception 'SmartyException' with message 'Unable to load template file 'element/tv/renders/input/richtext.tpl'' in /home/rx2/domains/collaborativemedia.ca/public_html/core/model/smarty/sysplugins/smarty_internal_template.php:162 Stack trace: #0 /home/rx2/domains/collaborativemedia.ca/public_html/core/model/smarty/sysplugins/smarty_internal_template.php(537): Smarty_Internal_Template->isExisting(true) #1 /home/rx2/domains/collaborativemedia.ca/public_html/core/model/smarty/Smarty.class.php(335): Smarty_Internal_Template->getRenderedTemplate() #2 /home/rx2/domains/collaborativemedia.ca/public_html/core/model/modx/modmanagercontroller.class.php(252): Smarty->fetch('element/tv/rend...') #3 /home/rx2/domains/collaborativemedia.ca/public_html/core/model/modx/modtemplatevar.class.php(1103): modManagerController->fetchTemplate('element/tv/rend...') #4 /home/rx2/domains/collaborativemedia.ca/public_html/core/model/modx/modtemplatevar.class.php(421): modTemplateVarInputRender->render('I have download...', Arra in /home/rx2/domains/collaborativemedia.ca/public_html/core/model/smarty/sysplugins/smarty_internal_template.php on line 162


              Before I update to the latest version of MIGX (though perhaps this isn't MIGX but I need to reinstall MODX, maybe missing a file?)

              Was this done:

              I think, I will add a upgrade-script which adds this MIGX-id field to all MIGX-TVs automatically.

              you need to update MIGX with the version from github for revo 2.2
              https://github.com/Bruno17/multiItemsGridTV/zipball/master
                • 4172
                • 5,888 Posts
                there is a version for revo 2.2 on the repo now.
                This version doesn't add the MIGX_id field automatically to existing TVs.
                You can do it by opening each item and save it again for now, if you need this field.
                  -------------------------------

                  you can buy me a beer, if you like MIGX

                  http://webcmsolutions.de/migx.html

                  Thanks!
                  • 4172
                  • 5,888 Posts
                  Quote from: rx2 at Jan 12, 2012, 10:25 AM
                  Ok, will try. I'm building some new code in another site with the new version. So basically MIGX_id replaces
                   [[+idx]]
                  ?

                  MIGX_id is a unique autoincrementing field, which will stay the same, also when you move an item to another place. It is a fix value stored into this item.

                  idx is only a counter, when you are listing items at frontend, not stored to the items.
                  If you are using pagination, with getPage for example this begins with 1 on every listing.
                    -------------------------------

                    you can buy me a beer, if you like MIGX

                    http://webcmsolutions.de/migx.html

                    Thanks!
                    • 37567
                    • 13 Posts
                    Hey Bruno,

                    I encounter a curious issue with 2.2.0.pl2 and your MIGX 2.0.0.beta1.
                    When I use toJsonPlaceholder, get that json into a snippet and there try to use the php json_decode on it, it won't work. If I just save the output into a string variable it will work.

                    I'm not very familiar with PHP, hence could you point me into the right direction how to get this issue resolve. (this was working fine with 2.1.5.pl and 1.1.0.rc2)

                    Thanks


                    UPDATE:
                    When printing out the json_last_error I get:
                    JSON_ERROR_SYNTAX.

                    However I can't possibly find anything that appears to be malformed.
                    Also when I take the output, copy and paste it 1:1 into a variable and do the decoding from there, it works perfectly.

                    Thanks for your help [ed. note: yminauen last edited this post 14 years, 8 months ago.]
                      • 4172
                      • 5,888 Posts
                      hmm... when I do this I get printed a correct array (tried with 2.2):

                      [[!getImageList? &tvname=`migx1` &limit=`3` &toJsonPlaceholder=`json`]]
                      
                      [[!print_r_json? &json=`[[!+json]]`]]




                      this is my snippet:

                      $json = $modx->fromJson($json);
                      return '<pre>' . print_r($json,1) . '</pre>';
                      


                      can you post your generated json-string?
                        -------------------------------

                        you can buy me a beer, if you like MIGX

                        http://webcmsolutions.de/migx.html

                        Thanks!

                      This discussion is closed to further replies. Keep calm and carry on.