Embedding from Wordpress H5P not showing on other sites

Hi There, 

I've recently started using H5P and have created a few activities on my Wordpress site, however, I'm having difficulty getting it to embed on other websites.  For example, if I copy the embed code and paste it into a blog post on my own site it works fine.  However when I copy the embed code and say paste it into Teachable and Thinkific (LMSs), I see a grey box representing the iframe but it says it wasn't able to connect to my site.

I've read that the issue could be to do with mixed content http and https, however my site has a SSL Certificate installed and so starts with https as do the sites I'm trying to embed content on.  Here's an example of the embed code from a test activity I've created, I'd really appreciate any guidance on how to get this to embed on other sites.

 <iframe src="https://www.vuesolutions.co.uk/wp-admin/admin-ajax.php?action=h5p_embed&..." width="759" height="611" frameborder="0" allowfullscreen="allowfullscreen"></iframe><script src="https://www.vuesolutions.co.uk/wp-content/plugins/h5p/h5p-php-library/js..." charset="UTF-8"></script> 

Thanks in advance.

P.s. I'm creating the content on my own site rather than on H5P.org to keep it private. 

otacke's picture

Hi nadyanathan!

It seems that your server has set the HTTP header's x-frame-option to "sameorigin". This prevents the content from being embedded in other pages. Please consult https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options for reference.

Best,
Oliver

Hi Oliver,

Thanks for coming back to me yesterday re what the problem seems to be, I really appreciate it.  I'm trying to find that particular x-frame-options line of code on my site at the moment, so as to adjust it bust struggling to find it.  Tried adding it to .htaccess file but no change, so need find the original location on the server and adjust it there.  Will let you know once sorted.

Kind Regards, 

Nadya     

Hi Nadya is the issue fixed. I am same issue. Created H5p content in primary site and broadcasted to subsite. But in subsite it is not loading. Any piece of advise will help to move. Thanks in advance.

I have the same issue. Can Someone help how to allow access to my h5p content per iframe on other sites?

 

otacke's picture

Hi!

If it's the very same problem, have you followed the link that I provided before? It contains sections on configuring the server (Apache/nginx). If you don't know how that works, your site's admin should be able to help you.

Best,

Oliver 

I have the same problem, too. I used a plug-in to set the X-Frame option to allow for the site I'm trying to embed in, and it still doesn't work.