Unable to display content in wordpres page (Content Unavailable)

I succesfully created content using quiz set and multiple question based on images and can view them in the H5P wordpress plugin without any issues BUT I have struggling to display content in wordpress using either using short codes or embedding them into the page. 

Short codes are not working at all in the wordpress page where as I was able to display content by embedding it into the page but that lasted for couple of days and now I see Content unavailble in the wordpress page where as it is working fine when I view this in H5P plugin.

Please advise how can I troubleshoot this and fix this. 

Regards

HK

I have tried updating pluging to latest but that did not help. 

BV52's picture

Hi HK,

Thank you for additional details. May I also ask for the following:

In order give your bug report the best chance of getting answered, please include the following information:

  1. Steps to recreate the bug
  2. Platform you're using: Wordpress (version number would be helpful as well)
  3. Mobile or Desktop
  4. Browser: Chrome, Firefox, Safari etc
  5. H5P plugin version
  6. H5P content type version
  7. Screenshots if it's a visual problem
  8. Please open the browser console (ctrl+shift+J for Chrome) look for error messages/

The more information you provide, the quicker the community will be able to fix it and the quicker you'll have a working solution!

 

Hi, 

wordpress - 4.8.2 Desktop 

H5P Plugin 1.94

Browsers - All 

Question Set - 1.13.2

There are no error messages on console when I open page containing the Question Set. All it displays is the iFrame with H5P as background and message Content Unavailable. I observed onething that it is only doing for Question Sets because when I created single multiple choice question and display that content on page by embedding it then it works. I have uploaded images in the forum post initially where I had show the Question Set working fine inside the H5P plugin window where I created it. Another image is loaded where you will find that it is not displaying the content.

I am using Wonderflux Girder theme on wordpress.

Initially everything was working fine and I was able to use Question Set. I think I started fiddling around with options to not show embedd, download and Copyright buttons to test and I think since then I am having issues. I tried deleteing H5P and reinstalling as well but that did not help either.

Please advise if you need more informaiton and I will provide that straighway.

Regards

HK

 

 

 

icc's picture

Are you using shortcode or embed code to insert content?

The Content unavailable message will only appear if you're using the embed code and you don't have permission to view the content – or – the embed has been disabled.

Go to Settings -> H5P and make sure the Display Embed button is set to Controlled by author - on by default, which is the default value.

Hi, I am embeding code to insert content. I had the Display Embed Button set to Controlled by author - off by default so that is why it was not displaying the content. 

Thanks for fixing this for me so quickly. I must say that I am loving H5P a lot and also trying to build a light weight LRS that we can store inside the wordpress itself so that we can store the xAPI statements inside the wordpress locally. 

I would create another post seeking some advice on that so that wider community can also benefit from this as long as you agree to the idea of storing xAPI statements locally so that we can do minimum reporting and analytics ourself rather than depending upon a full fledged LRS outside. 

Just one question on this Embed issue. Now content is working fine but it displays a Embed button on the bottom on content. Is there a way to remove this button to display. 

Can you also advise me on how to fix the shortcode issues because when I try to use shortcode inside the wordpress page, they does not work at all.

Regards

HK

icc's picture

1. Great that you got it working. Adding the following to your wp-config.php file will ensure that the embed code always work: (even when the button is disabled)

define('H5P_EMBED_URL_ALWAYS_AVAILABLE', true);

If you want to control which sites are allowed to embed your content you can get your web config to set the X-Frame-Options HTTP header.

2. For storing xAPI statements, you could have a look at our Moodle plugin which generates reports where the teachers can see what has been answered by the students. A generic PHP library is used for this.

3. When you try to use the shortcodes, are there any messages in the console? (Ctrl+Shift+J to open in Chrome + remember to reload the page)
Also, if you enter the Elements tab, hit Ctrl+F and search for 'h5p-iframe-wrapper' do you get any hits?

 

Hello, when i use shortcode I can see the h5p-iframe-wrapper and it has iframe also but src is blank. I am uploading image from the elements and that should provide you more informaiton.

Regards

HK

icc's picture

It looks like the shortcode is inserted correctly. Could you share a link to the page with the issue?
I'm guessing the problem is either one of these:

  1. JavaScript error on the page.
  2. It's inserted into a dynamic part of the page that is not visible at the time when the document is ready.

Have you tried resizing your browser to see if it becomes visible? 

Hi, as per suggestion i tried resizing and now surprisingly all H5P content stopped displaying even in the H5P Content in admin page. I had to reactivate the H5P plugin to bring every thing back but shortcodes are still no luck. I created a test page named as 1  on local wordpress instance and its permalink is  http://localhost:8888/guru/1-2/  and its cotent is [h5p id="6"]

Thanks & Regards

HK

icc's picture

Could you try switching themes and see if it starts working? 

Please note that the Wonderflux Girder is a demonstration child theme for Wonderflux. Also, the theme is not available in the WordPress Theme directory.

 

HI, You are right Its working in other standard themes sch as Twenty Sixteen. Just wondering why it would not work in Girder theme. Any pointer how can I debug this further?

Regards

HK

Just noticed that when I use Wonderflux Girder theme then height of iFrame shown as 1px where as when I chose Twentysixteen theme then height of iFrame is 600 px or what ever I set. Intresting .. 

icc's picture

Are you sure there are no red error messages in the console (Ctrl+Shift+J in Chrome) when you reload the page? 

Which version of the Wonderflux and Wonderflux Girder have you installed? I just installed the newest versions of both on my site and it works fine with H5P shortcodes.
Do you have any other plugins enabled? There could be a combination of plugins/themes that for some reason isn't compatible.

Also, you haven't done any modifications to the theme or enabled any special settings?

I checked again but there are no error messages on the console. Its weird why the iFrame height is 1px when using short code in Wonderflux Girder. I am using version 1.3 of Wonderflux Girder theme. I tried on other theme and it works perfectly. There is some issue with this theme only. I want to use short codes because then I can restrict others to embed my content in their websites. 

Currently unable to access h5p content into my website not to sure whether its an issue on my end or yours.

 

BV52's picture

Hi samuel-adusei,

Please see answer here.

-BV52

Hi, I'm using wordpress 5.2.4 and am having issues to display H5P content in my Wordpress post. I tested this in Chrome, Firefox and Safari. Any idea what I'm missing?

Many thanks,

BV52's picture

Hi abirenzi,

Would you mind providing the information below:

  1. Error message you are getting.
  2. Screenshot of the issue
  3. Any error messages in the browser console

-BV