-
Bug
-
Resolution: Won't Fix
-
Minor
-
None
-
4.4.3
-
MOODLE_404_STABLE
-
We recently updated our Moodle platform. Teachers who had embedded their H5P content in external sites reported that the integration no longer works.
It turns out that the script provided by the H5P plugin in Moodle for external platform integration includes a versioned script link:
<script src="https://[OUR-MOODLE]/h5p/h5plib/v124/joubel/core/js/h5p-resizer.js"></script> |
During the Moodle update, h5plib was upgraded to v126, and v124 no longer exists. As a result, the existing links return a 404 error.
This script is responsible for resizing the iframe based on the content's size, so while the content is still there, it is hidden inside an iframe with a height of 0px.
It seems that this script should not be openly versioned, or there should be a simple way to install older versions of the h5plib library. I noticed a dropdown to select an active h5plib version, but I can't find any information on how to reinstall version 124.
Steps to reproduce the issue:
- Start with a Moodle installation in an earlier version, for example, 4.0. The H5P library (h5plib) must be a version earlier than 126. You can check the version here : https://mymoodle.com/admin/settings.php?section=h5psettings
- Create an H5P activity.
- Use the "embed" button below the H5P activity (see H5P_1.png) to obtain the code for an iframe. At this point, notice that the provided code contains a script where the source (src) includes the version number of h5plib, for example, https://mymoodle.com/h5p/h5plib/v124/joubel/core/js/h5p-resizer.js. (see H5P_2.png)
- Insert this iframe code into any external platform or into an HTML file and ensure that the H5P content is embedded as expected.
- Update Moodle without retaining the old source code; in my case, I use a Docker image. At this point, h5plib is updated to the latest version (currently 126) and the old version is not retained because the old source code has not been kept.
- Try to display the page from step 4 and notice the error: the script https://mymoodle.com/h5p/h5plib/v124/joubel/core/js/h5p-resizer.js is now missing, and the iframe content is hidden within a 0px-high frame.
- will be (partly) resolved by
-
MDL-83358 Create and upload h5plib_v124 plugin to the Moodle plugins directory
- Closed