Unable to find constructor for H5P.iframeEmbed


Please help. I keep on getting this errors:

h5p.js?ver=2016110100:871 Unable to find constructor for: H5P.IFrameEmbed 1.0

and together with that error this following error:

h5p.js?ver=2016110100:984 Uncaught TypeError: Cannot read property 'getCopyrights' of undefined(…)

These errors causes the data that i've embedded not to show. It only shows blank. see attachment.


icc's picture

Which version of Moodle are you running?
This is strange, it seems like your Moodle site is having some issues creating the aggregated assets(combining JavaScripts/cache). Are there any messages in your web server's error_log? There could be some clues there.

You can disable the aggregation by adding the following to your config.php:

$CFG->mod_hvp_aggregate_assets = 0;

Do you still get the same error's in your browser's console?
Note that this isn't a recommended production setting as it will increase the load time.

Im on 3.1.2+

The errors on server log is "mod fcgi errors".


icc's picture

Ah, yes then there's something wrong with PHP/the plugin. I guess you'll have to enable the error messages for us to know what the issue is. You can do this by adding the following to config.php and reloading the page, or re-saving the H5P content:

@error_reporting(E_ALL | E_STRICT);   // NOT FOR PRODUCTION SERVERS!
@ini_set('display_errors', '1');         // NOT FOR PRODUCTION SERVERS!
$CFG->debugdisplay = 1;              // NOT FOR PRODUCTION SERVERS

I've added that script to the config file. Where will  the error messages appear.

icc's picture

The should appear both in the browser and the web server's log when saving H5P content. I would check both places to be sure.