Course presentation not loading

BV52's picture

Hi all,

I have some issues with course presentation: dosen't load. I can put another thing as video or queatios but cousre presentation don't work.

Any advice for me?

Thanks

Florin

Hi Florin,

1. Do you see an error message when creating a Course Presentation?

2. Where are you creating your contents?

-BV52

1. now error message. I only see Loading, please wait... and the gif for loading on the left of the text

2. I create my content on Moodle 3.3

I deinstall moodle and I reinstall it and the issues are still there

BV52's picture

Hi Florin,

In order to give your bug report the best chance of getting answered, please include the following information:

  1. Detailed steps to reproduce the bug (exactly how and when did it happen)
  2. Platform and version number. E.g. Drupal, Wordpress, Moodle.
  3. Mobile or Desktop
  4. Browser: Chrome, Firefox, Safari etc
  5. H5P plugin version
  6. H5P content type and version (if a content type was used), and a sample URL or attached H5P.
  7. Any browser console errors
  8. Any PHP errors
  9. Screenshots if it's a visual problem

The more information you provide, the quicker the community will be able to fix it and the quicker you'll have a working solution!

-BV52

I'm having the same issue.
Let me try to give you as much info as possible:

  1. Create new content - Course Presentation.
  2. The bug occurs both in Moodle and WordPress.
  3. I'm creating content on a Desktop.
  4. Checked it with Firefox and IE.
  5. The latest version.
  6. Course presentation.
  7. How do I find these out?
  8. No logs for now, will look into it if needed.

A bit more info: The course presentations open after reloading the pages a dozen times, but the buttons for the activities may not load or there's only a Go to slide icon. The resolution of the presentation may be off and I have to edit the font size manually and hope that it would work.

 

BV52's picture

Hi Florin,

Thank you for the information. For the errors in the browser console afaik in IE you can use F12 and in Firefox it's Ctrl+Shift+K.

-BV52

Hi BV52, I'm not Florin, but back to the case:

The console logs seem to be clear, I get 200 and 304 status codes. I'm going to look into PHP errors next.

BV52's picture

Hi geneklein,

I'm sorry I think the caffeine has not kicked in yet ;-)

Anyway looking forward for the PHP error logs if there is any. I would also like to request for a screenshot.

Do take note that I am unable to reproduce the issue/s.

-BV52

Seems I was early to dismiss the console logs. Today the presentation editor failed to load again and here's what I got from the logs.

Attachments: 
thomasmars's picture

Hi,
Unfortunately this is not enough info to determine what is wrong. We're only seeing the symptoms, not what is actually causing this.
It looks like your server is not set up correctly since it is not able to retrieve your library files, I recommend going through the Moodle installation guide in detail: https://docs.moodle.org/36/en/Installing_Moodle, and reinstall the H5P plugin and the libraries.
If it still doesn't work, please enable debugging on the developer level ( https://docs.moodle.org/36/en/Debugging ) to see what PHP errors you are getting.

Best regards, Thomas

Hi again, Thomas

The thing is that the only content that I'm having issues with right now is Course Presentation, the other types of content have no issues loading any libraries. I've also had the same problem on Wordpress, but today I updated the Course Presentation and, strangely enough, it seems to have fixed the issue for me. I just did a fresh install of the latest H5P version for Moodle (I used 1.14) but the same problem persists. Once I turn on the debugging mode though, what do I need to provide you with and how can I do that?

Can I somehow delete that content type and reinstall it without losing all the content itself?

thomasmars's picture

Hi,
You can download the example content at https://h5p.org/presentation and upload it to your site to make sure all your libraries are updated with the latest version. If this doesn't update any libraries, you already have the latest version of these libraries, but there could've been some error when they were initially installed. In this case you can set

$CFG->mod_hvp_dev = '1';

in your server's settings.php to let you update existing libraries, then upload the file again. It will replace the library files for Course Presentation, which should resolve any potential problems with the initial installation of the library.

When you have set debugging of your server to "DEVELOPER" and 'Display debug messages" they should show on your page whenever you get an error. So if you're getting an error when uploading libraries, turn on this feature and check what information you get, it will be very helpful in figuring out what goes wrong.

- Thomas

I don't have any errors with the libraries. The Course Presentation content works all the time, but the editor is the one that's not loading. I turned on PHP logging, as well as moodle debugging but I don't see any errors related to the plugin.

BV52's picture

Hi geneklein,

Have you tried Thomas' suggestion above?

-BV52

Yes I have, but, unfortunately, it didn't fix the editor. It opens when it feels like it. Sometimes I refresh the page 10-20 times until I get to see the editor working properly. The funny thing is that all the presentations themselves work as intended.

thomasmars's picture

Please check the requests in your browser's console for any errors in the response. Also check your PHP error log for any errors.

Can you suggest how to debug this in WordPress? I don't want to risk losing stuff on moodle and I have the same problem in my blog.

BV52's picture

Hi geneklein,

Are there any errors in the browser console when you see this issue?

-BV52

Hi BV52,
I've uploaded screenshots of the console logs back in 26.02. Those are the types of errors that I'm getting.

thomasmars's picture

Please look in your PHP error log to see what it reports when this happens.

I've turned on PHP logging and saw nothing at all. That's why I'm asking if there's any way to see PHP logs in Wordpress.

BV52's picture

Hi geneklein,

Sorry for the late reply.

You can learn more about this here:

https://h5p.org/documentation/troubleshooting-php

-BV52

No worries, BV52

I'll try the advice in your link at the weekend and get back to you about it. :)

Since the last Course presentation Update my Editor doesn´t work.I only see the Title but not the Rest of the Edit form.

When I chooce an other Content type I see the whole edit form and everything works fine. I use H5P via Drupal 8. On my backuppage erverything works fine, so there must be a problem with the new Course presentation Update. 

Attachments: 
thomasmars's picture

Hi, please check your browser's console for any errors ( https://developers.google.com/web/tools/chrome-devtools/console/ )

js_1LUBF8h36Qx-AqNjOtcGRAWQNcG0xulZOZSYlJ4WO-0.js:42 Allow attribute will take precedence over 'allowfullscreen'.
attr @ js_1LUBF8h36Qx-AqNjOtcGRAWQNcG0xulZOZSYlJ4WO-0.js:42
jquery.min.js:4 [Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.
send @ jquery.min.js:4
cp-editor.js?ver=1.20.5:228 Uncaught TypeError: H5P.CoursePresentation is not a constructor
    at H5PEditor.CoursePresentation.appendTo (cp-editor.js?ver=1.20.5:228)
    at Object.ns.processSemanticsChunk (h5peditor.js?pnooax:295)
    at ns.Form.processSemantics (h5peditor-form.js?pnooax:114)
    at h5peditor-library-selector.js?pnooax:330
    at h5peditor.js?pnooax:181
    at HTMLScriptElement.script.onload (h5peditor.js?pnooax:106)
thomasmars's picture

Hi,
Looks like your Course Presentation is not installed properly, please follow the instructions I gave earlier in this thread. You can re-upload the example content from H5P.com to your site while development mode is on to overwrite your local libraries, then check your PHP error log for any errors when you reinstall the libraries.

Sorry. I tried it. Still don´t work.

Now I get this error:

js_LEwshvvzNKN4bQ-E8OZeFMmEYcuYrN3HdNQtdpLR_rE.js:16 Allow attribute will take precedence over 'allowfullscreen'.
attr @ js_LEwshvvzNKN4bQ-E8OZeFMmEYcuYrN3HdNQtdpLR_rE.js:16
icon.svg:1 Failed to load resource: the server responded with a status of 404 ()
icon.svg:1 Failed to load resource: the server responded with a status of 404 ()
icon.svg:1 Failed to load resource: the server responded with a status of 404 ()
8Refused to apply style from '<URL>' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
icon.svg:1 Failed to load resource: the server responded with a status of 404 ()
icon.svg:1 Failed to load resource: the server responded with a status of 404 ()
icon.svg:1 Failed to load resource: the server responded with a status of 404 ()
icon.svg:1 Failed to load resource: the server responded with a status of 404 ()
icon.svg:1 Failed to load resource: the server responded with a status of 404 ()
icon.svg:1 Failed to load resource: the server responded with a status of 404 ()
icon.svg:1 Failed to load resource: the server responded with a status of 404 ()
icon.svg:1 Failed to load resource: the server responded with a status of 404 ()
thomasmars's picture

Please check your PHP error logs for messages.