PHP warning when installing and registering with H5P.org fails
Getting "Got error 'PHP message: PHP Warning: Cannot modify header information - headers already sent by (output started at /data/sites/anako/moodle/lib/upgradelib.php:1400) in /data/sites/anako/moodle/mod/hvp/library/h5p.classes.php on line 2784"
when installing a new install of Moodle. Since this is core functionality it can probabaly be experienced in the other integrations as well.
The problem is that fetchLibrariesMetadata assumes that it is called as an AJAX, so it is trying to set headers of the request, but in this instance the function is just called as a function from the install script. When the site fails registering the site with H5P.org it throws an ajax error, which sets headers, which is not allowed.
Fix is looking good!
Fixed, and answered forum. This error should however only have caused some error messages, not fail the entire installation, so I have asked the user if about this, maybe they have some additional problems.
An experienced Moodle team is unable to install H5P. I'm prioritizing this as a blocker. We release the fix along with other Moodle updates early next week.