Editor Not Loading In Video Settings

  1. Edit any video. The editor says Loading Please Wait. It never resolves
  2. Moodle 3.1.1
  3. Desktop
  4. Chrome, Firefox, Safari
  5. 1.6 and 1.7
  6. H5P Hub

As you can see with the uploaded images, the editor does not work and these are the errors you see in the web console. Updating H5P did not resolve the issue.

Attachments: 
thomasmars's picture

Hi,
What video are you editing, is this the H5P content type "Interactive Video" ?

It looks like your server is not able to get your installed libraries from your backend. Please check your PHP error log for any messages when this happens, this should be able to give a better indication on why you're not able to serve the libraries.

Does this happen every time you try to edit an Interactive Video and does it only happen to this content or to all other Interactive Video content as well ?

What version of the H5P Plugin are you currently using ?

This happens to all of our videos now. We were running 1.6 when we noticed the issue, but I tried upgrading to 1.7 to see if that will help (it didn't).  I don't see any PHP errors related to this issue. I checked the root error log for the website. Nothing related to HVP. Checked HVP folders for errors, and I don't see any error logs at all.

thomasmars's picture

Have you put Moodle into debugging mode ? See https://docs.moodle.org/34/en/Debugging for details.

Do you get any other console errors apart from the one you have pasted in ? What is the response from the content-type-cache request in your network tab (should look something like ajax.php?contextId=NN&token=NNNN&action=content-type-cache ?

OK, now i'm getting more detailed error logs in my hvp folder

 

[24-Jan-2018 10:01:54 America/Denver] Default exception handler: Error writing to database Debug: Table 'icente7_moodle.mdl_hvp_libraries_hub_cache' doesn't exist
TRUNCATE TABLE mdl_hvp_libraries_hub_cache
[array (
)]
Error code: dmlwriteexception
* line 477 of /lib/dml/moodle_database.php: dml_write_exception thrown
* line 982 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
* line 1877 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->execute()
* line 1434 of /mod/hvp/classes/framework.php: call to moodle_database->delete_records()
* line 2959 of /mod/hvp/library/h5p.classes.php: call to mod_hvp\framework->replaceContentTypeCache()
* line 2567 of /mod/hvp/library/h5p.classes.php: call to H5PCore->updateContentTypeCache()
* line 2927 of /mod/hvp/library/h5p.classes.php: call to H5PCore->fetchLibrariesMetadata()
* line 383 of /mod/hvp/editor/h5peditor-ajax.class.php: call to H5PCore->updateContentTypeCache()
* line 96 of /mod/hvp/editor/h5peditor-ajax.class.php: call to H5PEditorAjax->isContentTypeCacheUpdated()
* line 229 of /mod/hvp/ajax.php: call to H5PEditorAjax->action()

I'm attaching an image to show you all of the tables I do have. Maybe one of the names is different than it should be?

Attachments: 

Is it possible the issue has to deal with the fact that I need to update my Moodle version?

thomasmars's picture

I don't think so, H5P should be compatible with Moodle version >= 2.7 and <= 3.4.

Well, since nobody here knows how I can fix this, I have no choice but to uninstall and reinstall. We'll have to redo all of our videos, but I don't have any other recourse.

So, I was able to fix the issue. Because mdl_hvp_libraries_hub_cache didn't seem to exist, I decided to do a fresh install on a test server. I figured I could just copy a fresh copy of the table over. However, when I tried to import, it kept telling me that the table didn't exist even though I was trying to create it. So, I created a test table and tried to rename it to mdl_hvp_libraries_hub_cache, but then it told me that it already existed. This was odd since I couldn't find the table with a simple word search, however, I used SQL to pull up the table. It had a bunch of errors and the table had zero columns. So, I used SQL to just drop the table and import a fresh version. Totally fixed it.

thomasmars's picture

I'm happy you found a solution. I'm not sure how your database got corrupted though, did you find any error messages that could explain this ? Please let us know if you run into any other problems.

gtielemans's picture

In the past we created nice interactive H5P videos (Interactive Video Editor (1.15.0)?)  but now we have the eternal spinning wheel problem too. Interactive Video Editor (1.17.4)?  It is a H5P library problem: it is calling a javascript that is not  there. 
We see now both libraries in our moodle system.

Question 1: can you solve the problem in the library?

Question 2: if not, how can we go back to the previous situation? For example how to uninstall Interactive Video Editor (1.17.4)

tim's picture

@gtielemans, are you getting any errors in your console?

gtielemans's picture

no errors in console: we see two viewers and two editors, viewers work fine:

Interactive Video (1.15.0)
Interactive Video (1.17.5)

Interactive Video Editor (1.15.0)
Interactive Video Editor (1.17.4)

n.ribeirojorge's picture

Hi @Tim, hi everyone,

I work with @gtielemans. Indeed the H5P content type "Interactive video" isn't working. It keeps "Loading, please wait..."

Attached is a print screen with the errors we're getting in the console.

Thanks for your help.

Nelson

Attachments: 
thomasmars's picture

Hi, you have several errors. The most pressing one is modedit.php which is returning something unexpected. This is not part of H5P.
Please follow these guidelines to get a complete understanding of your problem: https://h5p.org/forum/9. Additionally this seems to be a PHP problem, so please take the time to follow our troubleshooting guide for PHP problems: https://h5p.org/documentation/troubleshooting-php.

Are other content types working properly ? Please make sure you have configured PHP properly for Moodle as, ref: https://docs.moodle.org/35/en/Server_settings

Best regards, Thomas