Posts made by Visvanath Ratnaweera

Picture of Particularly helpful Moodlers Picture of Translators
My, memory (hopefully)!

I applied the same patch, [hvp] Content throws "Exception - Call to undefined function str_contains()" [SOLVED], and the H5P "black" stopped throwing this error and the activities appear.
 
OK, what a power user tested, all worked. There are 8000 "black" H5P activities, waiting for the other users to react.
Picture of Particularly helpful Moodlers Picture of Translators

Hi all

I am getting Exception - Call to undefined function str_contains()

The more information points to https://docs.moodle.org/401/en/error/moodle/generalexceptionmessage. The full debug trace is:

Exception - Call to undefined function str_contains()

More information about this error

Debug info:
Error code: generalexceptionmessage×Dismiss this notification
Stack trace:
  • line 5042 of /mod/hvp/library/h5p.classes.php: Error thrown
  • line 4977 of /mod/hvp/library/h5p.classes.php: call to H5PContentValidator->_filter_xss_attributes()
  • line ? of unknownfile: call to H5PContentValidator->_filter_xss_split()
  • line 4909 of /mod/hvp/library/h5p.classes.php: call to preg_replace_callback()
  • line 4348 of /mod/hvp/library/h5p.classes.php: call to H5PContentValidator->filter_xss()
  • line 4707 of /mod/hvp/library/h5p.classes.php: call to H5PContentValidator->validateText()
  • line 4799 of /mod/hvp/library/h5p.classes.php: call to H5PContentValidator->validateGroup()
  • line 4707 of /mod/hvp/library/h5p.classes.php: call to H5PContentValidator->validateLibrary()
  • line 4550 of /mod/hvp/library/h5p.classes.php: call to H5PContentValidator->validateGroup()
  • line 4707 of /mod/hvp/library/h5p.classes.php: call to H5PContentValidator->validateList()
  • line 4550 of /mod/hvp/library/h5p.classes.php: call to H5PContentValidator->validateGroup()
  • line 4707 of /mod/hvp/library/h5p.classes.php: call to H5PContentValidator->validateList()
  • line 4707 of /mod/hvp/library/h5p.classes.php: call to H5PContentValidator->validateGroup()
  • line 4799 of /mod/hvp/library/h5p.classes.php: call to H5PContentValidator->validateGroup()
  • line 2264 of /mod/hvp/library/h5p.classes.php: call to H5PContentValidator->validateLibrary()
  • line 102 of /mod/hvp/classes/view_assets.php: call to H5PCore->filterParameters()
  • line 71 of /mod/hvp/classes/view_assets.php: call to mod_hvp\view_assets->getfilteredparameters()
  • line 44 of /mod/hvp/view.php: call to mod_hvp\view_assets->__construct()

The site is a Moodle 4.1.15 LTS, mod_hvp is 1.27.1 (2024112100), PHP 7.4.

Where should I start debugging? H5P noob here. ;-(

I have a staging upgrade of the site running - Moodle 4.5.1 LTS, mod_hvp is 1.27.1 (2024112100), PHP 8.2. It displays the activity faultlessly.

How can I get H5P in the 4.1.15 LTS working? It is our production site! We need to run it for another couple of months. This is not the only H5P activity failing, literally hundreds more are failing. I think they belong to a subset of activity types, this one is of type Course Presentation. There are a few more. 

Now at the end of the calendar year the activity is high and the priority is also high!

Average of ratings: -
Picture of Particularly helpful Moodlers Picture of Translators

In a Moodle 4.1.15, PHP 7.4, mod_h5pactivity 2022112801, opening a page like mysite/mod/h5pactivity/view.php?id=N gives:

api-version-unsupported : The system was unable to install the Column component from the package, as it requires a newer version of the H5P plugin. This site is currently running version 1.24, whereas the required version is 1.27 or higher. Please upgrade and then try again.

The activity was created by uploading a .h5p package. (I don't know from where.)

I have the site upgraded to 4.5 in a staging server. There it displays the activity without trouble. But this is the production site and needs to run a couple of months until we upgrade. How can I get the 4.1 production site working again? 

P.S. This is the same question as api-version-unsupported : ..unable to install the Column component from the package,... I got confused in the two versions of H5P and the discussion went nowhere. Sorry.

Average of ratings: -
Picture of Particularly helpful Moodlers Picture of Translators
> I have a specific user in mind - a teacher with no formal IT training on a limited budget

Then that must come before the answer. Otherwise the reader doesn't know. All sorts of people consult Moodle Docs.

I know, you did that in the case of the Rewrite of Ubuntu Step by step. But this, Moodle migration, is a different discussion.
 
> willing to learn and with ambition 
 
I doubt that. Copying and pasting Unix commands is not learning anything - except maybe the hard way (through small explosions and vapourized data). We spoke about some cases in the Ubuntu step-by-step discussion.