iframes won't save in MODX pages or chunks

423 Views Asked by At

I'm trying to embed items from YouTube and SoundCloud into my MODX (2.4) site. For example:

<iframe width="100%" height="450" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/216615565&amp;auto_play=false&amp;hide_related=false&amp;show_comments=true&amp;show_user=true&amp;show_reposts=false&amp;visual=true"></iframe>

I have tried embedding the code into a page (resource) and into a chunk, but neither resources nor chunks seem to be able to save when the iframe code is present.

Searching both here and on the MODX forums, I've seen that a similar issue has come up for others, but is usually caused by their WYSIWYG. I'm not using a WYSIWYG (I don't think I've got one installed) - everything in the content section of my pages is in html, and I'm having the same problem with chunks, so the solutions suggested elsewhere don't seem to apply to my case.

If anyone has any ideas about getting pages or chunks with iframes to save properly, or what might be causing the problem for me, I'd be very grateful.

1

There are 1 best solutions below

1
On BEST ANSWER

If you are not able to save i.e. chunks and resources containing special code, you are often facing a mod_security issue.

If you can't solve it yourself with the hints in the MODX 'Installation on a server running ModSecurity' documentation, you have to contact your ISP and search with them a solution.