Forum

Thread tagged as: Problem, Error

Can't Embed a Youtube Video

Trying to embed a YouTube video into a code block and it will not let me do it.

Embed code is :

<iframe width="695" height="391" src="//www.youtube.com/embed/aM4uv-M1Zo4?rel=0" frameborder="0" allowfullscreen></iframe>

I just get an "Access Denied" message. That's it.

Am I doing something wrong?

Philip Young

Philip Young 0 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Where are you trying to do this, and what does your template look like?

Template looks like this:

<perch:content id="text" type="textarea" label="Code" html="true" editor="markitup" />

This is in a page, I am putting in a Code Block with the template above. It will not let me save the Youtube code. That's when I get the access denied message.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Which system is issuing that error?

I get that error in Safari when I am trying to save the changes in Perch.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok. Does it come from your browser, your web server, PHP, or something else?

It must be the browser as when I view source all I get is :

Access Denied. No other code.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Can you submit the form successfully without the iframe?

I'm wondering if this is over-zealous security settings on the server. (Hackers like to try to insert iframes - so your innocent form submission could look bad.)

Yes. It works fine without the iFrame.

What do I need to ask my hosting provider?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ask them if there are any security settings that would cause you to get an "Access denied" message when posting form content containing an iframe.