When a H5P activity with attached files is uploaded in a content bank and then the course is deleted, the following error is displayed:
Moodle 3.11.6+ (Build: 20220315), PHP 7.3
This error occurs while delete an empty course:
H5P-Datei nicht gefunden (ungültige Kontext-ID)Error code: invalidcontextid
×Stack trace:
line 512 of /h5p/classes/api.php: moodle_exception thrown
line 359 of /h5p/classes/api.php: call to core_h5p\api::get_pluginfile_hash()
line 53 of /contentbank/contenttype/h5p/classes/contenttype.php: call to core_h5p\api::delete_content_from_pluginfile_url()
line 271 of /contentbank/classes/contentbank.php: call to contenttype_h5p\contenttype->delete_content()
line 5209 of /lib/moodlelib.php: call to core_contentbank\contentbank->delete_contents()
line 5011 of /lib/moodlelib.php: call to remove_course_contents()
line 68 of /course/delete.php: call to delete_course()
This was the single record in table of contenbank_content:{{}}
id name contenttype contextid visibility instanceid configdata usercreated usermodified timecreated timemodified
1 dreisatz-aufgaben-verschiedene-16.h5p contenttype_h5p 373 1 0 2 2 1605825791 1605825829
full pluginfile $url was: https://.....de/pluginfile.php?file=/373/contentbank/public/1/dreisatz-aufgaben-verschiedene-16.h5p
h5p/classes/api.php => in function get_pluginfile_hash()
With this URL as a parameter, the first lines of code in this get_pluginfile_hash() function don't seem to get the correct slasharguments - the $parts and $path variables are incorrect or empty. From this reason the invalidcontextid error occurs.
We're not sure - could this be a bug?
- duplicates
-
MDL-66879 Allow rendering of h5p files when $CFG->slasharguments = false
-
- Open
-