Moodle 3.9 H5P problem

Moodle 3.9 H5P problem

by Ryan Smith -
Number of replies: 9

When I go into an H5P content bank on Moodle 3.9, I see the following with a lot of "missing translation" errors:

Missing translations


Any idea what could cause this? We upgraded from 3.8.3 to 3.9 this past weekend. We are using the en_us language pack with the Classic theme. I tried purging the language strings cache but that didn't fix it.

Average of ratings: -
In reply to Ryan Smith

Re: Moodle 3.9 H5P problem

by Sara Arjona Téllez -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Ryan!

Thanks for raising it. However, I cannot reproduce the problem through on either my local site or https://sandbox.moodledemo.net/ . I've even tried to upgrade a site from Moodle 3.8 to 3.9 having en_us as the default language.

There may be some other error on your site that triggers this problem, please check your web server logs for errors, and enable debugging in moodle to see if you get any errors displayed. 

It will also help if you could change the language to "en" or any other you have installed in your site and share which is the behaviour in that case.

Thanks in advance!

Average of ratings: Useful (3)
In reply to Sara Arjona Téllez

Re: Moodle 3.9 H5P problem

by Ryan Smith -

Thank you for your help. It is now fixed. I removed my installed language packs, installed them again (including en_us), and then cleared the caches and the strings are now detected correctly. This was a really strange issue!

Average of ratings: Useful (2)
In reply to Ryan Smith

Re: Moodle 3.9 H5P problem

by Sara Arjona Téllez -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Hi Ryan!

Thanks for sharing what you did for fixing this issue. It's really weird (I've never faced while working on this translations part). Hopefully, it will never happen again so it will be an unresolved mystery tongueout

Cheers!
In reply to Sara Arjona Téllez

Er: Re: Moodle 3.9 H5P problem

by Iñigo Zendegi Urzelai -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hi there,

We are also experiencing that same issue with a lot of "Missing translation" messages when adding H5P content to the content bank.

I've tried reinstalling all the other langpacks and clearing the caches but that didn't solve the problem. In our case this happens even while using the English language pack (note that some of the texts - Title, Panels - are well shown):

H5P Missing translations

Looking at the logs I've seen this error message that seems to be related:

Default exception handler: Invalid content ID Debug:
Error code: invalidcontentid
* line 498 of /lib/setuplib.php: moodle_exception thrown
* line 67 of /contentbank/contenttype/h5p/classes/form/editor.php: call to print_error()
* line 214 of /lib/formslib.php: call to contenttype_h5p\form\editor->definition()
* line 59 of /contentbank/classes/form/edit_content.php: call to moodleform->__construct()
* line 95 of /contentbank/edit.php: call to core_contentbank\form\edit_content->__construct()

We are using Moodle 3.9.1, if you need more data tell me what could be meaningful for you.

Thanks!

In reply to Iñigo Zendegi Urzelai

Re: Er: Re: Moodle 3.9 H5P problem

by Maresa Mühlemeier -
I'm experiencing the exact same problem. Were you able to fix it by now? I appreciate any tipp 😊
In reply to Maresa Mühlemeier

Re: Er: Re: Moodle 3.9 H5P problem

by Ryan Smith -

It ended up being a language pack issue for us. For some reason, the en_us language pack was only partially downloaded and missing files. I re-installed the pack and it fixed the H5P string issues. Good luck!

Average of ratings: Useful (1)
In reply to Ryan Smith

Re: Er: Re: Moodle 3.9 H5P problem

by Maresa Mühlemeier -

Thank you! Sadly, for us this did not solve the problem. Did you reinstall the package via the moodle administration pages or in any other way?
We checked the strings and a lot seem to be missing but also don't get installed when updating the packages, so I'm wondering which way of installing you used that was successul.

In reply to Iñigo Zendegi Urzelai

Re: Er: Re: Moodle 3.9 H5P problem

by Rajneel Totaram -
Picture of Core developers Picture of Plugin developers
We had been experiencing this as well.

After spending many hours trying to find the cause and a fix, this is what we found.

The language files (en.js, etc) in the H5P library (h5p/h5plib/v124/joubel/editor/language/) got converted to Windows format by our git client.
The code to parse the H5P language file expects Unix file formats and was, therefore, not able to correctly parse the language strings.

Replacing the files in h5p/h5plib/v124/joubel/editor/language/ and rebuilding cache fixed the issue.

See https://tracker.moodle.org/browse/MDL-71343 for more details.

Hope this helps.
Average of ratings: Useful (1)