Error with Moodle 3.1.17

Dear H5P Developer,

I installed H5P with Moodle 3.5.x and it works without any issues.

But if I try to install H5P with Moodle 3.1.17 I get this error message right after installing it via GIT repo:

"Fatal error: Class mod_hvp\file_storage contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (H5PFileStorage::saveFileFromZip) in /var/www/html/moodle/mod/hvp/classes/file_storage.php on line 40"

I tried everything, but without luck. I use the stable branch (version 1.17.2)

Thanks for any help

Best regards

Andreas

Hello Andreas,

Did you find a solution to your problem:

I have Moodle 3.5.4+ (Build: 20190222) version and when I try to reinstall H5P after removing the older version, I get the same error:

Fatal error: Class mod_hvp\file_storage contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (H5PFileStorage::saveFileFromZip) in /var/www/html/moodle/mod/hvp/classes/file_storage.php on line 40

Best regards,

tpan

Hi Tpan,

sorry no solution yet. Still waiting for a hint from the developer :-)

Best regards

Andreas

Hi Tpan,

sorry, no solution yet. I'm waitnign for a hint from the developer :-)

Best regards
Andreas

After searching on google, I realized the issue on GitHub "Master is actually Dev?? "

and reinstalled the plugin with stable branch instead of master, and the problem is solved.

Did you also use stable while installing the plugin?

Regards,

tpan

Dear tpan,

thanks for your advice, but for me not :-) I used the stable branch (version 1.17.2) and after installing I get a white screen. with Moodle 3.1.17. Sadly no one else responses to my question, so H5P isn't available for me right now :-(

 

Hi tpan,

...and was on another server successful with installing the libraries and get H5P running on Moodle 3.1.x.

On the production server I test every pernission combination, because in another thread I saw that such problems avoid loading content types.

If I use the chrome browser console, I get this error and have again no idea how to fix it:

"wwwroot/moodle/mod/hvp/ajax.php?contextId=10708&token=0f775dd62fc46&action=content-type-cache 403 (Forbidden)

Do you had such an error before also?

Thanks

Andreas

Hello Andreas,

No, I did not have such an error before. It is weird to have it working in one of the servers and not working in another.

Good luck with search for a solution,

Regards,

Tpan

BV52's picture

Hi Andreas,

The error message you are getting is usually caused by permission settings or the .htaccess is misconfigured or corrupted. You mentioned that you already made a few changes in the permission so .htaccess could be culprit. I hope this helps.

-BV52

Hi BV52,

I tested again on a clean test installation of Moodle 3.5.5+ and H5P on a RedHat 7 Server with PHP 7.0. The web server admin didn't find any issues with the installation nor the .htaccess file.

But in Chrome network console I found this link, whicht gives a 403 error:

https://WEBROOT/moodle/mod/hvp/ajax.php?contextId=21&token=8d909b65c76c4...

The console messsage ist: Success false: You're haven't the permission to watch content-types."

The Moode debug code is:

line 750 of /course/modlib.php: call to can_add_moduleinfo()
line 63 of /course/modedit.php: call to prepare_new_moduleinfo_data()
Capability "mod/hvp:savecontentuserdata" was not found! This has to be fixed in code.
line 434 of /lib/accesslib.php: call to debugging()
line 50 of /mod/hvp/locallib.php: call to has_capability()
line 95 of /mod/hvp/locallib.php: call to hvp_get_core_settings()
line 142 of /mod/hvp/locallib.php: call to hvp_get_core_assets()
line 213 of /mod/hvp/mod_form.php: call to hvp_add_editor_assets()
line 481 of /course/moodleform_mod.php: call to mod_hvp_mod_form->data_preprocessing()
line 142 of /course/modedit.php: call to moodleform_mod->set_data()

 

Hope this helps and thanks for your support

Andreas

icc's picture

Very strange, I've never seen this before. If you look inside mod/hvp/db/access.php you should see that the mod/hvp:savecontentuserdata is defined on line 102.

I recommend that you uninstall the plugin and then reinstall using the zip file provided here: https://moodle.org/plugins/mod_hvp

Thanks for helping :-) That did the trick. Maybe somethings wrong with the GIT repo?