Problem upgrading Interactive Books from version 1.7.12 to 1.9.5 with Moodle plugin 1.27.0 in Moodle 4.1.14
Hi there!
After updating our H5P Moodle plugin to version 1.27.0 (2024091200) in our Moodle 4.1.14 instance, and after updating the H5P content libraries, I tried to upgrade 322 interactive Books from version 1.7.12 to version 1.9.5 but 48 remained in the previous version and the following error appeared in the console during the upgrade process:
►Error TypeError: Cannot read properties of undefined (reading ’split')polyfill.js:138
at 8 (https://our.site/pluginfile.php/l/mod_hvp/libraries/H5P.InteractiveBook-...)
at https ://our.site/mod/hvp/library/js/h5p-content-upgrade-process.js:128:15
at next our.site/mod/hvp/library/js/h5p-content-upgrade-process.js:288:7)
at https ://our.site/mod/hvp/library/js/h5p-content-upgrade-process.js:304:11
Any idea of what could be causing this issue?
Thanks in advance for your help!
Gio
otacke
Tue, 10/29/2024 - 22:17
Permalink
At first, it looks like some
At first, it looks like some parameter that is supposed to be upgraded is not set (undefined). The "split" command expects to work on a string (a sequence of characters), not some "undefined" value. However, the upgrade script for Interactive Book that is referenced in the console (https://github.com/otacke/h5p-interactive-book/blob/master/upgrades.js) does not contain any split command. It in fact seems to happen in some "polyfill.js" file. A polyfill is a replacement for some other code, so to speak. It might replace something in the "upgades.js" file, but I'd not know what or where it comes from.
Could you please share one of the contents that cannot be upgraded?
papi Jo
Wed, 10/30/2024 - 12:18
Permalink
@Oliver,As far as I can see,
@Oliver,
As far as I can see, the polyfill.js scripts are only present in the H5P Drag the Words library. Can the OP confirm that their H5P Interactive Books which throw this error when being updated contain Drag the Words activities?
giofonseca
Wed, 10/30/2024 - 14:59
Permalink
Hi Oliver, thanks for your
Hi Oliver, thanks for your reply!
I would love to share one of those contents, but how could I identify in Moodle which of the 322 Interactive Books we have, are the ones that were not possible to be upgraded, do you know an easy way to identify them?
Thanks in advance!
Gio
otacke
Wed, 10/30/2024 - 16:50
Permalink
On the H5P library management
On the H5P library management page you should see an info button next to the upgrade button. It should tell you what contents use the respective library version.
giofonseca
Wed, 10/30/2024 - 17:08
Permalink
I have seen that info-button
I have seen that info-button in WordPress plugin but in Moodle I see only the upgrade-button (see picture enclosed)
otacke
Wed, 10/30/2024 - 18:02
Permalink
Hmm, I hardly ever use moodle
Hmm, I hardly ever use moodle. I know that button from Drupal and WordPress and had assumed the behavior to be identical across all the H5P integrations by H5P Group. Sorry!
If that is not an option, then it would in fact be hard to do this without looking into the database.
papi Jo
Wed, 10/30/2024 - 18:12
Permalink
1. where does that screenshot
1. where does that screenshot come from ? 'Wordpress or Moodle"?
2.- Please answer my question about whether your Interactive Book activities that cannot be updated contain Drag the Words contents.
giofonseca
Wed, 10/30/2024 - 18:44
Permalink
Hi Papi Jo!to your questions
Hi Papi Jo!
to your questions:
1.- that screenshot is from Moodle
2.- Unfortunately I have not identified which are those Interactive books that were not able to be updated, therefore I am not able to answer your question.
I will ask our IT-Expert to check in the database, I have no access to it.
Thanks and best regards,
Gio
papi Jo
Wed, 10/30/2024 - 23:11
Permalink
Hi Giio,1.- No, that
Hi Giio,
1.- No, that screenshot is not from Moodle. There is no "update" icon displayed in the list of H5P contents & libraries in Moodle...
2.- Since you are using H5P on Moodle, please post your problem to the relevant forum there: https://moodle.org/mod/forum/view.php?id=8603
Discussions are much easier on the Moodle forums than here, where there can be a long delay between posts being validated and appearing.
giofonseca
Thu, 10/31/2024 - 10:29
Permalink
Hi Papi Jo!1. sorry to
Hi Papi Jo!
1. sorry to contradict you, but, yes that screenshot is from Moodle, I made it my self ;) We are talking here, about mod_hvp, I don't know if you are thinking on the core H5P activity in Moodle, but we keep that one deactivated in our Moodle, since they are still not having the way to bulk-upgrade H5P content and other disadvantages I have been followed-up during last 3 years or so ;) You can see the new screenshot I made where the Moodle version is shown. ;)
2. Thanks for your advice, I will do a post also on that forum ASAP.
Best regards and thanks for your help!
Gio
papi Jo
Thu, 10/31/2024 - 17:00
Permalink
Hi Gio!
Sorry, I had not realized you were talking about the H5P external plugin for Moodle, and not the core H5P activity!!!
Must say the co-existence of those 2 H5P activites within Moodle is a nuisance, because when people ask for help we never know which one they are talking about. Sorry again!
Franck POUFFET
Wed, 10/30/2024 - 16:48
Permalink
BonjourJ'ai un code d'erreur
Bonjour
J'ai un code d'erreur très similaire (mon moodle est à jour 4.5) lorsque je souhaite mettre à jour le contenu des vidéos interactives dans h5p.
Si vous avez des idées, n'hésitez pas à me les communiquer.
Merci beaucoup
Franck
papi Jo
Wed, 10/30/2024 - 23:05
Permalink
Frank,1.- This is an English
Frank,
1.- This is an English-speaking forum. Please do not post in French. Ceci est un forum anglophone, merci de ne pas poster dans d'autres langues que l'anglais.
2.- Your problem is NOT THE SAME as the one reported by the OP; please refrain from adding your own problem, which causes confusion. Ton problème n'est PAS LE MEME que celui rapporté par Gio. Inutile d'ajouter de la confusion sur le forum.
Franck POUFFET
Fri, 11/01/2024 - 07:03
Permalink
Hello Sorry, I'm posting in
Hello
Sorry, I'm posting in English... page translator maybe! I withdraw my question, especially as the problem has resolved itself.... I still can't read my h5p content, but that's another subject with no solution to date :-(
Thanks for the help.