H5P Content Display Issues After mod_hvp to mod_h5pactivity Migration - Constructor Errors

H5P Content Display Issues After mod_hvp to mod_h5pactivity Migration - Constructor Errors

by Tasos Stat -
Number of replies: 3

Message:
Hi everyone,

I hope it's appropriate to post this here. We're experiencing significant problems after migrating from mod_hvp to mod_h5pactivity that seem related to the version bump issues discussed in this forum.

Our Environment:
- Moodle 4.5.1+ (Build: 20250109)
- Successfully migrated using the official "Migrate content from mod_hvp to mod_h5pactivity" tool

Migration Journey & Current Issues:

We originally had problems with missing icons and input box borders in mod_hvp, so we decided to use the migration plugin hoping it would solve these visual issues.

1. Initial Problem: After migration, H5P uploads showed infinite loading icons - couldn't create new activities or access content bank
   - Solved: Deactivating WIRIS plugin resolved the upload issues

2. Current Major Problems:
   - Many migrated activities don't display at all - just blank pages where content should appear (like Interactive Books that show nothing)
   - Browser console shows: Unable to find constructor for: H5P.Column 1.18
   - Visual/styling issues with content that does load - the original missing icons and input box border problems persist, plus general styling inconsistencies

Technical Analysis:
Looking at the database and content JSON, we found library version mismatches:
- Content JSON contains hardcoded references to "H5P.Column 1.13" 
- Available Column versions: 1.16.2 and 1.18.8 (no 1.13)
- JavaScript tries to resolve to "H5P.Column 1.18" but fails to find the constructor

Questions:
1. Has anyone experienced similar constructor/library loading issues specifically after hvp→h5pactivity migration?
2. Are there additional post-migration steps needed for library compatibility?
3. Could this be related to the H5P library version updates discussed here, even though we're on 4.5.1 with v1.27 support?
4. Any suggestions for resolving the styling/CSS issues with migrated content?

The migration tool completed successfully, but much of our content is unusable. Our teachers are understandably frustrated with content that worked perfectly before migration (apart from the original styling issues we hoped to fix).

Any insights or similar experiences would be greatly appreciated!

Average of ratings: -
In reply to Tasos Stat

H5P Content Display Issues After mod_hvp to mod_h5pactivity Migration - Constructor Errors

by Oliver Tacke -
Picture of Particularly helpful Moodlers

I don't know what the migration tool does in detail. It's possible that your Interactive Book contents were created with Interactive Book version 1.3 (which depends on Column 1.13) but that the migration does not migrate/copy the dependencies. Then Column 1.13 would be missing, and contents requiring it would fail while others (newer ones) work.

On the other hand, that would not explain "Unable to find constructor for: H5P.Column 1.18" - I'd expect 1.13 to appear here.

You could try to

  • ensure that all the H5P content type libraries are up to date in both H5P integrations, 
  • upgrade your existing content that was created with the plugin, so it uses the latest libraries, and
  • then migrate.

That should at least rule out library issues. Missing borders, however, rather sound like CSS customization anyway.

In reply to Oliver Tacke

H5P Content Display Issues After mod_hvp to mod_h5pactivity Migration - Constructor Errors

by Tasos Stat -
Hi Oliver,

Thanks a lot for your reply and suggestions! Unfortunately, we still haven’t been able to resolve the problem.

Here’s what we tried so far:

Deleted all cached libraries and re-uploaded them.

Used the H5P CLI tool (h5p-cli) to check for inconsistencies.

Cleaned the database tables related to H5P libraries and forced reinstall of all required libraries.

The result is that I now have multiple versions of the same library (example: Column 1.13.1, 1.16.2, 1.17.0 – screenshot attached).

Column_versions

When I try to open certain migrated activities (e.g., Interactive Book), I get errors like the one in the console screenshot (uncaught TypeError, destructured parameter is undefined, and “Unable to find constructor for: H5P.Column 1.18”).


From your reply, I understand that the best path would be to upgrade all content to use the latest library versions before migration. My problem is: we have many courses and a large number of activities, so manually editing and re-saving each one is not really feasible.

My question is: Is there a way to trigger this upgrade process for all H5P content in bulk (via CLI or script), so that all existing activities are updated to the latest library versions automatically, instead of having to open them one by one?

That would really help us make progress.

Thanks again for your help!
In reply to Tasos Stat

H5P Content Display Issues After mod_hvp to mod_h5pactivity Migration - Constructor Errors

by Oliver Tacke -
Picture of Particularly helpful Moodlers

Would be great to know what that "destructured parameter" is that is displayed in the console - did you open the console only after you had tried to run the content? If yes, having it open before should ensure that the parameter is printed properly. I have a hunch - did you by any chance install the latest master branch of H5P.Question from github (?) - but may be something else, too.

Having different minor versions of libraries is totally normal if you have contents with different dependencies. But Column 1.18 seems to be missing still, so it cannot be loaded. Or is it not listed under "P" for Page?

You could consult "Why should I upgrade existing H5P content and how?".