Potential content loss upon the upgrade of H5P content type Game Map
Submitted by yrng on Wed, 08/20/2025 - 11:41
Forums:
Hi everyone,
On our platform (Moodle v4.5, the H5P integration is running framework v1.27), we noticed the following:
- When a Game Map is upgraded from v1.2 to v1.5 (by making edits and saving), the “Stage content” for the stages in the Game Map disappears (or at least shows up empty in the editor).
- As a result, the entire H5P activity no longer displays in Moodle.
Has anyone else experienced this? Any ideas on possible causes or fixes would be greatly appreciated!
Thanks in advance!
H5P file:
otacke
Wed, 08/20/2025 - 22:36
Permalink
Could you please share that 1
Could you please share that 1.2 content allowing to replicate what you are experiencing?
yrng
Thu, 08/21/2025 - 16:55
Permalink
Here are a few sample packages
Game map versions in the system: 1.2.10 and 1.5.4
otacke
Thu, 08/21/2025 - 22:16
Permalink
Hi!Test run 1Uploaded your 1
Hi!
Test run 1
Test run 2
Test run 3
Test run 4
Intermediate hypothesis
Something fishy is going on with the upgrade process on moodle's custom H5P integration.
Investigation 1
Investigation 2
Preliminary conclusion
It looks as if, even though Game Map 1.5 is installed, the relevant function of the upgrade script of GameMap is not run on the parameters of your GameMap 1.2 content before it is saved, and only the library dependencies get upgraded. When H5P then saves the content, H5P detects that the parameters do not match the modified semantic structure that is expected in GameMap 1.5, and hence H5P removes the invalid parameter values - the stage contents that you added.
I don't have a local moodle instance to check more thoroughly and to build a more solid case, but my observations match the aforementioned explanation.
Please reach out to moodle HQ and report your findings and share a link to this post that they may refer to for more information. If the upgrade procedure of moodle's custom H5P integration in fact does not work properly, I'd consider this a bug that should be fixed rather sooner than later.