Poster lagt til av Visvanath Ratnaweera

Bilde av Particularly helpful Moodlers Bilde av Translators
Hi all

In case the video is missing, please go to the Moodle Academy webinar. It is a significantly extended version of this talk.
 
In a sense, one can call this thread CLOSED. ;)
Gjennomsnittlig vurdering:Useful (1)
Bilde av Particularly helpful Moodlers Bilde av Translators
Sorry for being such a blockhead. I am seldom in the H5P world and don't have the background. Yes, it is better to stay to 'str_contains()' error, the topic of this discussion.

Thanks to the patch you suggested, that error is gone. Or to be more accurate, none of the H5P content we opened threw this error. There are literally hundreds of them, in copies.
 
The classes start tomorrow after the Autumn vacation. Apart from the teacher who reported this error, others won't know that their H5Ps were hung during the vacation - for "maintenance" when they're back. ;)

Many thanks for the continuous support you provided. This thread can be finally called CLOSED.
Bilde av Particularly helpful Moodlers Bilde av Translators

That is it!

I repeat the solution for those who come here with the same problem:

In ./mod/hvp/library/h5p.classes.php

 - 5042 if (str_contains($match[1], 'font-family')) {
 + 5042 if (strpos($match[1], 'font-family') !== false) {

It is indeed the ./mod/hvp/library in Moodle 4.1.14 which broke compatibility with PHP 7.4. See https://github.com/h5p/h5p-php-library/pull/193.

So, the matter is SOLVED with a "code hack". I hope the developer will take a second look. Moodle 4.1 LTS compatible with PHP 7.4 is (security) supported till December 2025!

A final question though: Can I (should I) re-enable the “Download available H5P content types from h5p.org” scheduled task now? This site, Moodle 4.1 LTS / PHP 7.4 has a bulk of H5P content created with both plug-ins. It just has to run till the Spring 2025!

Gjennomsnittlig vurdering:Useful (1)
Bilde av Particularly helpful Moodlers Bilde av Translators

Thanks for coming back. No, I'm not sure what is causing the problem. I've missed the screenshot in my first post. I attach to to this post.

Otherwise everything I said in that post applies.

So far I've found that all "Interactive content" are defective. There are many other H5P content which are OK. Yes, I disabled the “Download available H5P content types from h5p.org” scheduled task - but only on the 17th inst.

Yes both H5P plugins are active.

Vedlegg Screenshot_2024-10-19_21-27-38.png
Bilde av Particularly helpful Moodlers Bilde av Translators
Fair enough. I shouldn't be telling the developers *how* to solve the problem. What I'm saying is, they shouldn't appear in sites, specially not in a site that has not been upgraded (major) but just updated (minor). Both the cases mentioned in the original post crept in with the update to 4.1.14, an LTS, two weeks ago, and updating a plug-in detected as deprecated as a result.
 
The root cause of one is a change in an upstream library, the other is due to an API change in Moodle. So, due to different causes. That is the scary thing. There may be more. I don't know whether we should change the common opinion here that updates (minor) are harmless. Instead advise to test even updates (minor) and (resulting) plug-in updates first in a staging server.
 
Well, I updated - turning my production server in to a staging server.
trist