Scheduled task to Download available H5P content types ERROR

Scheduled task to Download available H5P content types ERROR

by Ahmad Mababaya -
Number of replies: 9

Hi!

Using Moodle 3.9+, in Site administration  > Reports > System status, I noticed the following Error:

Tasks max fail delay

It comes with the following Details:

Fail delay: 4 hours 16 mins - Download available H5P content types from h5p.org (core\task\h5p_get_content_types_task)


I checked the Logs for the following Scheduled task:

Download available H5P content types from h5p.org


The following is displayed:

Execute scheduled task: Download available H5P content types from h5p.org (core\task\h5p_get_content_types_task)

... started 11:43:03. Current memory use 15.1MB.

... used 10 dbqueries

... used 3.9137780666351 seconds

Scheduled task failed: Download available H5P content types from h5p.org (core\task\h5p_get_content_types_task),Can not create file "1/core_h5p/library_sources/0/H5P.Column"


Could anyone kindly advise what should be done in this case?

Average of ratings: -
In reply to Ahmad Mababaya

Re: Scheduled task to Download available H5P content types ERROR

by Beatriz Rojo -
Hi Ahmad,
I'm not an expert in analysing and solving this type of error messages, but I'd first check if everything is OK regarding the h5p libraries. It seems there is some problem with the library for the H5P column content type.
Have you checked how is the status of the H5P core activity libraries? I could include all types of H5P activities in the content bank without any further action, because all activities were installed. This is how my content status for the column looks like (Site administration>H5P>Manage H5P content types
):


If the column activity is not listed, you should go to h5p.com or .org, download this activity and upload it.
Hope it helps.
In reply to Beatriz Rojo

Re: Scheduled task to Download available H5P content types ERROR

by Ahmad Mababaya -
Hi, Beatriz!

Much thanks for your suggestion.

When I checked the Manage H5P content types, the Column content type was not installed. So, I went to h5p.org and downloaded it to upload it to our Moodle site. Installation was successful.

However, the Scheduled task, "Download available H5P content types from h5p.org" still fails...
In reply to Ahmad Mababaya

Re: Scheduled task to Download available H5P content types ERROR

by Beatriz Rojo -
Oh sorry Ahmad, this issue goes beyond my skills and knowledge, then 😕.
In reply to Ahmad Mababaya

Re: Scheduled task to Download available H5P content types ERROR

by Vivek SM -

Moodle 3.9+ (Build: 20200626)

Me too getting the same error;

I tried to download the H5P.Column activity from the H5p.org and updated in content bank it got updated and again schedule task failed for H5P.course presentation, When I download the h5p course presentation from the H5P.org then I got error mysql server has gone away and unable to delete the file updated in the content bank.

Deleted the local cache, cache and tried no help. Done fresh installation and updating the error here.

Execute scheduled task: Download available H5P content types from h5p.org (core\task\h5p_get_content_types_task)

... started 15:27:01. Current memory use 15.4MB.
... used 10 dbqueries
... used 10.419813156128 seconds
Scheduled task failed: Download available H5P content types from h5p.org (core\task\h5p_get_content_types_task),Can not create file "1/core_h5p/library_sources/0/H5P.Column"
Debug info:
Duplicate entry '88b06733853c58c1ef1f0091cbac4e336fda5734' for key 'mdl_file_pat_uix'
INSERT INTO mdl_files (contextid,component,filearea,itemid,filepath,filename,timecreated,timemodified,mimetype,userid,source,author,license,status,sortorder,contenthash,filesize,pathnamehash) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
[array (
  0 => 1,
  1 => 'core_h5p',
  2 => 'library_sources',
  3 => 0,
  4 => '/',
  5 => 'H5P.Column',
  6 => 1593683831,
  7 => 1593683831,
  8 => 'application/zip',
  9 => NULL,
  10 => 'https://api.h5p.org/v1/content-types/H5P.Column',
  11 => NULL,
  12 => NULL,
  13 => 0,
  14 => 0,
  15 => 'e609dae9eb4471472cc1340eb9250673aa441f7d',
  16 => 4761236,
  17 => '88b06733853c58c1ef1f0091cbac4e336fda5734',
)]
Backtrace:
* line 1210 of /lib/filestorage/file_storage.php: call to file_storage->create_file_from_pathname()
* line 239 of /h5p/classes/core.php: call to file_storage->create_file_from_url()
* line 202 of /h5p/classes/core.php: call to core_h5p\core->fetch_content_type()
* line 69 of /lib/classes/task/h5p_get_content_types_task.php: call to core_h5p\core->fetch_latest_content_types()
* line 248 of /lib/cronlib.php: call to core\task\h5p_get_content_types_task->execute()
* line 120 of /lib/cronlib.php: call to cron_run_inner_scheduled_task()
* line 73 of /lib/cronlib.php: call to cron_run_scheduled_tasks()
* line 79 of /admin/cli/cron.php: call to cron_run()


In reply to Vivek SM

Re: Scheduled task to Download available H5P content types ERROR

by Beatriz Rojo -
Hi,
I'm sharing with you my settings, I didn't change anything, all settings where there by default and the scheduled task was performed without problems.


Average of ratings: Useful (1)
In reply to Beatriz Rojo

Re: Scheduled task to Download available H5P content types ERROR

by Daniel Thies -
Picture of Core developers Picture of Plugin developers Picture of Testers
The scheduled task defaults to running on the first of the month. I you do not want to wait, the admin may need to run it manually. The 'Run now' link that appears above is a convenient way to do it, but only appears if enablerunnow and pathtophp settings are configured.
Average of ratings: Useful (2)
In reply to Daniel Thies

Re: Scheduled task to Download available H5P content types ERROR

by Ahmad Mababaya -
Hi!

I tried the "Run now" but to no avail.

I was wondering what would happen if I'd just uninstall the core H5P from our Moodle site and install the plug-in from here instead:

https://moodle.org/plugins/mod_hvp

Any thoughts on what could possibly be the result and is the H5P that comes by default any different from the one downloadable on Moodle.org?
In reply to Ahmad Mababaya

Re: Scheduled task to Download available H5P content types ERROR

by Daniel Thies -
Picture of Core developers Picture of Plugin developers Picture of Testers

You can uninstall (or disable) the core activity, but this does not really affect the content types as they are part of the content bank which is in the core. However, you can install and use the module above and it should work independently.

I had similar problem and fixed it by retrieving the pathnamehash report in the error message above and deleting the files table entry corresponding to it with an SQL command. If it is a production system it needs to be taken offline and backed up if you do that.

In reply to Vivek SM

Ri: Re: Scheduled task to Download available H5P content types ERROR SOLVED

by Claudio Gasparini -
Moodle 3.8.4
Me too getting the same error.

"Duplicate entry '88b06733853c58c1ef1f0091cbac4e336fda5734' for key 'mdl_file_pat_uix'"

I solved it this way:

On "Atto toolbar settings" I click on "Uninstall the plugin "Insert H5P" but not completely, only for the first part.
And then reinstalled.

The error is gone.