We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 45739
    • 64 Posts
    After trying to figure out why my footer wouldn't input in the chunk, I discovered my real problem:

    I can't add or edit any chunk or template with a widget or code in it. After pressing save, it'll try to save, then the dimensions of the Manager will offset and move up & left, and after that I can't successfully click anything in MODX and have to reload.

    Some examples of code I'm trying to create chunks/templates with/for:

    Facebook:
    <iframe scrolling="no" frameborder="0"
    
                      allowtransparency="true" style="border:none; overflow:hidden; width:200px; height:45px;"
    
                      src="http://www.facebook.com/plugins/like.php?href=http://www.facebook.com/myfacebookpage&send=false&layout=standard&width=200&show_faces=false&action=like&colorscheme=dark&font&height=35"></iframe>
                   


    Twitter:
     <a data-link-color="#ccc" data-theme="dark" data-chrome="nofooter noheader transparent noscrollbar"
    
                    height="200" width="230" data-widget-id="346557522754293760" href="https://twitter.com/DevCodes"
    
                    class="twitter-timeline">Tweets</a>
                  <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
                  


    Mailchimp:
     <div id="mailform-subscribe">
                    <form target="_blank" class="validate" name="mc-embedded-subscribe-form"
    
                      id="mc-embedded-subscribe-form" method="post" action="#"> <input
    
                        type="email" onblur="if(this.value=='')this.value=this.defaultValue;"
    
                        onfocus="if(this.value==this.defaultValue)this.value='';" id="mce-EMAIL"
    
                        class="required email" name="EMAIL" value="Your Email" size="15" />
                      <div class="clear" id="mce-responses">
                        <div style="display:none" id="mce-error-response" class="response"></div>
                        <div style="display:none" id="mce-success-response" class="response"></div>
                      </div>
                      <div class="clear"> <input type="submit" class="button" id="mc-embedded-subscribe"
    
                          name="subscribe" value="Subscribe" /> </div>
                    </form>
                  </div>





    I have MODX 2.20 on my other site, and I've used many of these same widgets and they worked perfectly fine..After all a chunk is just a call, I don't understand why these won't work. Is it really the MODX 2.3.1?

    Does anyone know how I can fix this? Please & Thank you
    • I have no problem with any of those.

      Are the two sites on the same server? This almost sounds like a mod_security issue.
        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
        • 45739
        • 64 Posts
        Quote from: sottwell at Aug 07, 2014, 05:23 PM
        I have no problem with any of those.

        Are the two sites on the same server? This almost sounds like a mod_security issue.

        Are you using MODX 2.3.1?

        No they are on different servers, but both bought from the same provider (webhostingpad)
        • Yes, Revo 2.3.1.

          You can save any other kind of content in the chunk?
            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
            • 45739
            • 64 Posts
            Quote from: sottwell at Aug 07, 2014, 05:44 PM
            Yes, Revo 2.3.1.

            You can save any other kind of content in the chunk?

            Everything else that I've tried yes, which mind you has just been HTML or CSS code.

            Is there something I can tell my hosting provider to modify or check?
            • You can ask them if their mod_security or suhosin settings could be causing problems with saving forms with that kind of content. If it is, they should be willing to modify or even disable the settings for you.

              You might also be able to get a look at the error logs, I think mod_security has its own logs as well.
                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
              • It comes to mind that it could also be a corrupted or missing file in the Manager itself. You might want to try completely replacing the /manager/ directory.

                How did you install? Unzip on your local machine and upload all of the files via FTP?
                  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
                  • 45739
                  • 64 Posts
                  Quote from: sottwell at Aug 07, 2014, 10:47 PM
                  You can ask them if their mod_security or suhosin settings could be causing problems with saving forms with that kind of content. If it is, they should be willing to modify or even disable the settings for you.

                  You might also be able to get a look at the error logs, I think mod_security has its own logs as well.

                  Would it be dangerous to disable mod_security completely?

                  I installed by uploading the entire zip using cPanel's file manager, and unzipping through cPanel
                    • 45739
                    • 64 Posts
                    I had my hosting provider disable mod_security and that seemed to fix the issue.. Any dangers to that solution?
                    • No. Just always make sure to validate and sanitize any user input that you use from forms on your pages. Which you should be doing anyway.
                        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