H5P no longer working in Wordpress

Hiya,

We have updated our servers and H5P is no longer working in Wordpress.

When I try and view or edit content in the H5P backend in Wordpress I just get a grey, blank screen.

Also, any page that has H5P content will only partially load, so I have had to deactivate the plugin.

What are the server requirement for running H5P? We have PHP 7.2.9

Many thanks,

Nige.

library.northamptoncollege.ac.uk

BV52's picture

Hi Nige,

The generic H5P part of the plugin should support PHP versions as low as 5.2. Having said this in order to give your report the best chance of getting answered, please include the following information:

  1. Detailed steps to reproduce the bug (exactly how and when did it happen)
  2. Platform and version number. E.g. Drupal, Wordpress, Moodle.
  3. Mobile or Desktop
  4. Browser: Chrome, Firefox, Safari etc
  5. H5P plugin version
  6. H5P content type and version (if a content type was used), and a sample URL or attached H5P.
  7. Any browser console errors
  8. Any PHP errors
  9. Screenshots if it's a visual problem

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

-BV52

Hiya,

Thanks for the reply. We have actually fixed the issue by rolling back our PHP to v7.0

Thank you,

Nige.

BV52's picture

Hi Nige,

I'm glad you were able to fix the issue. If you have additional questions feel free to post in the forums.

-BV52

Hiya,

I spoke too soon!

The issue is back.

It happens with both Chrome and Explorer. Wordpress is v4.9.8 and PHP is 7.0.31 and H5P is the latest version and it happens to all content types.

When I go into WP and click on H5P Content, I get the list of all my content as normal. When I clcik on the content name I go into the content view as normal too. However, if I go into edit for any content and make a change and then update, I'm left with a blank. grey screen. If I clcik on H5P content again I see my list but if I clcik on the recently editied content I get the gery screen again. Viewing all undeited content is fine.

Interestingly, I have a couple of activities that I can no loner see that are embeded into Moodle and these are now not displaying in Moodle either.

The WP page for the 'bad' content does not display correctly. The loading of the page seems to hault when it gets to the H5P:

library.northamptoncollege.ac.uk/induction

There should be some H5P under the tabs and some further general content below this.

Thanks,

Nige.

BV52's picture

Hi Nige,

Can you please provide items 7-9 above. I'm suspecting that there is an issue somewhere and having those information can give us more clues to what is causing the issue.

-BV

Hi, thanks,

I don't get any console or PHP errors (that I can se anyway). All I can show you is the screen when the content disapears:

error

Thanks

Nige.

We have this exact same same problem which Nige described.

BV52's picture

Hi slaato,

Have you tried checking if you have any PHP errors?

-BV52

I can not add new content. See picture.
I can not see details of my previous content. See picture 2.
The posted content is still working on my site.

Attachments: 
icc's picture

Did you do an upgrade of the plugin before this happened? Did you install the plugin through Git or did you download it?

Try setting the following in your wp-config.php and reload the page:

define('WP_DEBUG', true);
error_reporting(E_ERROR | E_WARNING | E_PARSE);

This should reveal any error messages we need to figure out the problem.

Hi,

I should add that changing PHP version (back or forth from 7 - 7.2.9) on our server resets the issue and all seems OK until I edit content again.

Thanks,

Nige

icc's picture

It looks like maybe the non-working PHP installation is missing an extension or something. You should try turning on error messages through the wp-config.php file and reproducing the issue, this should give you a better understanding of what's going wrong.

define('WP_DEBUG', true);
error_reporting(E_ERROR | E_WARNING | E_PARSE);

Thank you,

I will give that a go!

Nige.

Hiya,

I have added that to the config file but I'm not sure where to find any eror messages that are generated?

Thank you,

Nige.

Hiya,

We have dropped back to PHP 5.3 and things are working again.

Thanks

Nige.

icc's picture

Nice to hear that you got it working. But you should take causing using such an old version of PHP as you may be exposed to security vulnerabilities. You can read more about it here: http://php.net/supported-versions.php

The errors are typically printed in the browser or to the web server's error log.
One other thing you could do is to compare the php.ini settings or phpinfo() between the two different PHP installations. There may be some important extensions that aren't enabled.

I have the same problem but I haven't change anything on my website. One day it was perfect, the next, is not as you can see in the pictures attached. 

Attachments: 

Hiya,

Everythings has worked since we dropped back to PHP v5.3, though I don't like the solution much.

Thanks,

Nige.

icc's picture