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

    I’ve previously built a web site using modx (an earlier version) with a google calendar iframe in a page, and it’s displayed beautifully. However, on the site I’m currently developing with version 0.9.6, I just can’t get it to work.

    Here’s an example of the kind of code I’m trying to put in the content page:

    <iframe src="http://www.google.com/calendar/embed?src=neilcreek%40gmail.com&height=614" style=" border-width:0 " width="640" frameborder="0" height="614"></iframe>


    What happens is I edit an empty content page, in text mode (no editor), and put only the above code into the page. When I click "save", the edit frame disappears and oddly a non-styled preview of a completely different page (content and template) is displayed in the same frame. Clicking on the correct page in the left menu reloads the page as it was before the edit. I can make other edits to the site without this problem happening.

    One factor that may have contribited to this issue: MODx was installed on the server with a particular domain associate with it. The client changed to a new domain and the hosting account dropped the old domain and updated with the new one. I changed anywhere I could see that referred to the old domain, but I don’t think it was mentioned anywhere in the config file or the Tools-Configuration menus.

    Any ideas?

    Thanks in advance for any help.
      • 3749
      • 24,544 Posts
      I have a Google Calendar embedded in a site with a call just like yours and it works fine in 0.9.6 so the MODx version is definitely not your problem.

      Have you tried putting some simple html in the page rather than the Google Calendar iframe to see if that change "sticks" or not?

      I suspect that your problem has nothing to do with Google or iframes but rather a problem with MODx’s stored information about your site that confuses the Manager about where to put changes you make to the page.

      One thing to try is to copy the whole document’s contents to the clipboard, delete the document, purge it, clear the site cache, re-create it from scratch, and paste the code back in.

      This might solve your current problem, but if the MODx database is confused, there may other problems that will show up later.

      You might go into PhpMyAdmin and search the MODx database for references to the old domain name.


      Bob
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 21112
        • 156 Posts
        Thanks for the reply and the suggestions.

        I gave those a try with no luck, so I took a more drastic step and deleted both the database and wiped the entire modx installation and started over (the site is only just beginning construction). Upon attempting to put the google calendar code into the default pag, I get the following error in the edit frame:

        Forbidden
        You don't have permission to access /manager/index.php on this server.
        
        Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
        Apache/1.3.37 Server at www.ywasg.com Port 80
        


        Interestingly when I remove all of the content of the iframe, the edit saves fine, as is true with any other kind of HTML code (or all that which I could test). When I remove any *part* of the google calendar code, or any parts and leave even pne part intact, I get the same error above. Even if the only code is <iframe height="100"></iframe> I get the error.

        It should be noted, as it may be relevent, that when i go to phpyadmin via my hosts control panel, it still goes to the old address for the site. Could this be confusing things?
          • 10487 MODX Staff
          • 1,535 Posts
          I would almost put money on it being an Apache mod_security issue - seen similar errors time and again on these forums and it’s always boiled down to a mod_security issue. Depending on how the host has configured mod_security (read: how stringent they’re being) can have some odd responses to things like page postbacks to the server.

          Check this wiki page for hints ’n tips on what you can do to see if it is really a mod_security issue and how to address it: http://wiki.modxcms.com/index.php/What_is_mod_security_and_how_does_it_affect_me

          That’s my two pennies worth, hope it helps,
          Garry
            Garry Nutting
            Senior Developer
            MODX, LLC

            Email: [email protected]
            Twitter: @garryn
            Web: modx.com
            • 21112
            • 156 Posts
            Bingo!

            The .htaccess setting that fixed it was: SecFilterScanPOST Off

            Is this going to cause me any other potential problems?

            Thanks so much for the help!
              • 3749
              • 24,544 Posts
              Quote from: neilcreek at Sep 04, 2007, 08:57 PM

              Bingo!

              The .htaccess setting that fixed it was: SecFilterScanPOST Off

              I’m glad you got it sorted and I’m sorry I led you down the wrong path.

              Bob
                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting