H5P Content not displaying on WordPress website
Submitted by milesdavis on Sun, 03/28/2021 - 14:43
Forums:
I have a WordPress website and use Tutor LMS. I am using H5P presentations as content.
When you start a course, the first lesson appears, but when you click on any other lesson in the lesson list, the content does not appear. However, if you refresh the page, the content appears. The Tutor LMS support people seem to think it's a problem with the H5P shortcodes. I have entered my website in an international competition and I am desparate to ensure it functions correctly. Are you able to help at all?
Technical details
Website: https://mastervocabulary.com/
- Content type: H5P presentations
- Device: Desktop
- Wordpress: 5.7
- H5P: 1.15.0
- PHP 7.4.1
- Browsers used: Chrome, Safari, Microsoft Edge
Browser console error
- JQMIGRATE: Migrate is installed, version 3.3.2
- (index):1 [DOM] Found 2 elements with non-unique id #_tutor_nonce: (More info: https://goo.gl/9p2vKq) <input type="hidden" id="_tutor_nonce" name="_tutor_nonce" value="6a2f84dc04"> <input type="hidden" id="_tutor_nonce" name="_tutor_nonce" value="6a2f84dc04">
- DevTools failed to load SourceMap: Could not load content for https://mastervocabulary.com/wp-content/themes/docent-pro/js/bootstrap.m... HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
- DevTools failed to load SourceMap: Could not load content for https://mastervocabulary.com/wp-content/themes/docent-pro/css/bootstrap.... HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
otacke
Mon, 03/29/2021 - 07:15
Permalink
Hi Miles!Those error messages
Hi Miles!
Those error messages don't have anything to do with H5P. I am not familiar with how TutorLMS loads pages or content.
It could be a problem with "lazy loading" mechanisms that change the order/timing for loading files - not necessarily caused by TutorLMS, but potentially by some other plugin.
It could also be a missing resize if TutorLMS loads content but hides it first (e. g. in different tabs). In that case, a workaround is to use https://wordpress.org/plugins/snordians-h5p-resize-pulse/ but a proper solution would require to either add a line of code to TutorLMS or to write a custom plugin.
Best,
Oliver
otacke
Mon, 03/29/2021 - 14:44
Permalink
Hi Miles!I now had a look at
Hi Miles!
I now had a look at TutorLMS. My previous ideas won't help. It may be a little technical, but anyway ...
When a TutorLMS lesson is (re-)loaded, then
Now, when you change the lesson in TutorLMS via the lesson list (not when you click on previous/next), TutorLMS does not reload the whole page but only requests WordPress to set up the post, thus to replace the shortcode for some other H5P content (in 2)), but H5P is not lurking in the background anymore. It replaces the shortcode with the iframe frame and updates the settings, but never actually sets the required settings for the new content and never tries to replace the frame with the content in 5).
So, although it's quite clear what needs to happen, I am not sure if it will.
On the one hand, the H5P core team could change how H5P content is loaded and rendered or , but I am not sure how much work that would be - and the H5P core team might rightfully ask why they should take extra care of TutorLMS ...
On the other hand, the TutorLMS team could add some extra handler for H5P content (when they let WordPress set up the post), load/reference the required resources themselves and run the H5P.init function - but they could rightfully ask why they should take extra care of H5P ...
A quick hack (that may have side effects that I have not checked for), is to add one line of code to TutorLMS:
That will trigger H5P to add the settings that it has updated to the page and also trigger the "document ready" handler again that will tell H5P to render the contents.
Note however, that your changes will be overwritten whenever you update the TutorLMS plugin.
Cheers,
Oliver
sekander
Thu, 05/13/2021 - 16:41
Permalink
Reply from Tutor LMS Team
Hello Oliver,
Thank you so much for taking a kind look at Tutor LMS plugin source code. As far I understand, the way you have recommended to edit the source code of Tutor LMS is not a good way to modify things.
So, I was wondering if we could find a way to add the H5P compatibility officially in a non-invasive way. Do you think it is possible for us to work together to add the H5P compatibility?
My email address is sekander at themeum dot com. We have very limited resources right now. So, I am not sure if we can invest some resources very soon but I want to give this a try and see how far we can go. We have around 22 emails requesting the H5P compatibility.
otacke
Thu, 05/13/2021 - 19:35
Permalink
Hi sekander!I am sorry, but I
Hi sekander!
I am sorry, but I am in no position to decide anything in that regard. Either the H5P core team will have to help you or the TutorLMS team.
Best,
Oliver
sekander
Mon, 09/13/2021 - 08:45
Permalink
Hi,Can you please connect me
Hi,
Can you please connect me with the Core team?
BV52
Mon, 09/13/2021 - 19:54
Permalink
Hi sekander,I suggest that
Hi sekander,
I suggest that you send an email through the contact form. So that I can send the request to the developers. There is no guarantee that changes will be made since it looks like this a specific only to how Tutor LMS "loads" lessons.
-BV
esimmens
Fri, 09/10/2021 - 19:34
Permalink
Update
Does anyone have any updates on this issue? I would really love to use H5P with Tutor LMS.
You can use an H5P embed code as the embedded video source -- which loads it -- but it cuts off the bottom for some reason..
3oax
Mon, 02/14/2022 - 10:36
Permalink
Edit Line 379 in h5p.js file
Edit Line 379 in h5p.js file (wp-content/plugins/h5p/h5p-php-library/js/h5p.js) and replace with:
After this it should work in mobile Safari and Desktop.