We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25287
    • 81 Posts
    I have developed a site in Revo that has been working smootly. Recently I updated to 2.2.0-pl2 (traditional).

    Suddenly I had problems saving resources. The "Please wait ..." "Saving ..." dialog would appear and remain, with the resource unsaved.

    After some trial and error (lots of errors) I seem to have narrowed it down. If I include an iframe (eg. Google Maps) in a TV the resource will not save. Exclude the iframe (even replace it with text) and the resource will save fine.

    (Edit - Resources that existed before the update display fine with the iframe, this only affects new or attempted updates to resources)

    I seem to have an issue with js in chunks too, but have not been able to spend any time on that.

    I did some searching, but found no answers. Does anyone have any suggestions?

    Thanks [ed. note: robinqld last edited this post 12 years, 2 months ago.]
      • 34926
      • 87 Posts
      Have you tried placing the iframe in a chunk, template or snippet?

      Also is it possible to approach this differently? Chunks aren't meant to contain logic by nature (I know its only Javascript but still) so it would probably be better to have the Javascript external or in a separate template/TV.

      Iframe's have been looked down on a bit which is noticeable in the fact that they were deprecated in XHTML 1.1. You can try using the object element as an alternative. Also Google has a Javascript API for Google Maps that is easy to use.

      Ignoring that I don't have access to my computer right now so sorry if that isn't helpful.
        • 25287
        • 81 Posts
        Thank you Gibbs,
        putting the iframe in a chunk worked, as did directly into the resource.

        I was trying to make use of templating to simplify things - putting the iframe code into a generic TV rather than creating a new one for each resource. I'm doing it that way to reduce the chance of accidental changes by other users who can't edit elements.

        Thanks for the tip on Javascript - will look at that later tonight.

        Rob
          • 47222
          • 3 Posts
          Anyone have an idea of how to make this work in a TV?

          I have the exact issue. MODx stopped allowing me to save iframe code in a TV when I upgraded to Revolution 2.2.14-pl. Worked fine in 2.1.5-pl. Interestingly, I am able to place these iframe embeds in the content field without issue, so it's only happening in TVs.

          Each of my articles has 5 to 6 videos embedded, so I need to put that embed code in a TV per article. Chunks are not an option as that would build up a massive backlog of chunks.

          Please help, thank you!



          Quote from: robinqld at Feb 14, 2012, 09:00 AM
          I have developed a site in Revo that has been working smootly. Recently I updated to 2.2.0-pl2 (traditional).

          Suddenly I had problems saving resources. The "Please wait ..." "Saving ..." dialog would appear and remain, with the resource unsaved.

          After some trial and error (lots of errors) I seem to have narrowed it down. If I include an iframe (eg. Google Maps) in a TV the resource will not save. Exclude the iframe (even replace it with text) and the resource will save fine.

          (Edit - Resources that existed before the update display fine with the iframe, this only affects new or attempted updates to resources)

          I seem to have an issue with js in chunks too, but have not been able to spend any time on that.

          I did some searching, but found no answers. Does anyone have any suggestions?

          Thanks
          • I just tried it, and have no problem at all. Can you post an example of the code you cannot save?
              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
              • 47222
              • 3 Posts
              Howdy Susan,

              Here's the code below. It's a basic YouTube embed.

              <iframe src="http://www.youtube.com/embed/fLOeH-Oq_1Y?rel=0" frameborder="0" width="560" height="315"></iframe>


              I was able to save it in PHPMyAdmin directly to the database field, so I'm pretty sure it's MODx not letting this save. MODx security settings?

              Could it be a PHP setting on the server?

              I can save any other HTML, just not iframe. In fact, if I enter the code below, it won't save.

              <iframe>nothing</iframe>


              Thanks!
              • My thought is a mod_security or suhosin security configuration on the server, not allowing that in a POST. The phpMyAdmin access is usually separate from the web server configuration, so doesn't have that restriction.
                  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
                  • 47222
                  • 3 Posts
                  Quote from: sottwell at Apr 14, 2014, 05:57 PM
                  My thought is a mod_security or suhosin security configuration on the server, not allowing that in a POST. The phpMyAdmin access is usually separate from the web server configuration, so doesn't have that restriction.

                  I tried adding the following to my .htaccess file in an attempt to disable mod_security:

                  SecFilterEngine Off


                  This throws a 500 internal server error.

                  Actually, I don't think it is a server setting because this code can be saved in the content field. It only hangs when an iframe is entered in a TV.

                  Any ideas?
                  • No, I have no problems saving an iFrame in a TV.
                      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