wordpress update to 1.7 failed

I use wordpress 4.7.

I wanted to Install new types of contents but the installation failed saying I need a newer version of H5p. I updated the plug-in and now nothing works. First it said somthing about updating libraries, but now I can't find this message. I deactivated the plug-in, then tried to activate it, but it doesn't work saying 

Fatal error: Declaration of H5PWordPress::fetchExternalData() must be compatible with that of H5PFrameworkInterface::fetchExternalData() in /home/b/bzubza/a-egorova.ru/public_html/wp-content/plugins/h5p/public/class-h5p-wordpress.php on line 3

I had over 300 exercises made with the help of h5p on my site now nothing works. Please help. What should I do? Can I download an older version anywhere so that everything started working again?

icc's picture

Hi! Usually, there are very few issues related to upgrading the H5P so I'm sorry to hear that you're having trouble. 

Thank you for including the error message. This error is usually associated with running an outdated version of PHP. Do you know which version you are on? If you have a look at the following page you can see which version you should be on: http://php.net/supported-versions.php

Running an older version means that you site might have security vulnerabilities.

That said, there is an easy fix you can do you self to get the plugin working again. If you are able to locate line 845 of wp-content/plugins/h5p/public/class-h5p-wordpress.php it should look like this:

public function fetchExternalData($url, $data = NULL) {

If you are on windows the easiest way of opening the file and finding the correct line number is by using a text editor like notepad++ or atom.io.
Now you need to modify the line by removing the ' = NULL' part. So that it looks like this:

public function fetchExternalData($url, $data) {

Save the file and now try to reload your page – it should now be working.

We will include a fix in the next release to avoid this sort of error in the future. Thank you for reporting.