In some servers, the H5P content is not displaying and i am seeing the below error in error console.
Tue, 09/20/2022 - 18:20
I think one of the main reasons why Oliver asked you to post your concern in the bugs forum so that you will provide more information as requested. So would you mind providing the followng:
If it worked before:
The more information you provide, the quicker the community will be able to fix it and the quicker you'll have a working solution!
Wed, 09/21/2022 - 10:11
The "other" reason is that the "Developer forum" is for developer discussions, hence the description "Technical forum about Content Type or System Plugin development."
Fri, 09/23/2022 - 09:16
I have explained all the details in the attachment and attached the h5p package also, please check the same.
Fri, 09/23/2022 - 09:24
Please find my comments below,
1. Detailed steps to reproduce the bug (exactly how and when did it happen)
Fri, 09/23/2022 - 13:54
You say "Now we have migrated the application to new server, after that the package is not working, before it was worked in old server". It is very likely that this is the root of your problem.
The message "Word is not a constructor" means that the `Word` class doesn't get instantiated, which is quite weird as it's part of the content type which itself seems to work. The only reasons that I can think of is that either the word.js file might be missing or cannot be loaded (in that case you'd see a red entry in the network tab of the browser's development tools) or that the respective entry in the database for the MarkTheWords library doesn't list it. Might have been a migration issue - and you don't describe how that migration took place.
As you can see at https://app.Lumi.education/run/WggBr0 your content works just fine on a platform where everything was installed properly.
You could try to download the MarkTheWords demo content and to upload that on the faulty moodle instance, but you will have to set the H5P plugin for moodle into development mode temporarily, please see https://h5p.org/node/1295120 for an explanation. Not sure if re-uploading a library is possible on moodle's custom H5P integration though (in case you're using that one) that was not created by the H5P core team.
Wed, 11/23/2022 - 13:23
I followed these steps and resolved the issue.
Wed, 11/23/2022 - 15:47
So you whiped all libraries in the database just to re-install Mark The Words!? Gee ...
Wed, 11/23/2022 - 16:33
Yes, when you update the h5p activity, the libraries will get update automatically.
Wed, 11/23/2022 - 17:41
Not all of them. Only those that come along with the library that you uploaded.
Wed, 11/23/2022 - 13:26
I followed these steps and fixed the issue.
Wed, 11/23/2022 - 17:48
Yes, you have to update the remaining packages to update the library.
Wed, 11/23/2022 - 21:54
Just wanted to leave the note that deleting entries in the database can be dangerous, so you should only do that if you know what you are doing. Don't want to stop you if you wanna do it. Have fun. But maybe tell others that things may break! You're showing to delete every library entry including old minor versions that may still be required and cannot be obtained by uploading the latest release files.
Connect with H5P
H5P is a registered trademark of Joubel