Error loading H5P via AJAX persists in D8 version of the module

Created on 17 May 2019, about 5 years ago
Updated 12 March 2023, over 1 year ago

When using the ajax call to show a node containing some h5p content, the content is rendered correctly after a page reload, but not when the same ajax call is repeated without page reload.

How to test?
1) generate a "H5P test" page that shows some h5p content
2) generate a second "AJAX reference test" page with "full html" text containing an "a" element with a href to the first page. Add the ajax options to "a", so that the referenced page is loaded in a modal window or off canvas or in a named html element on the same page.
3) open the AJAX reference page
4) click on the link, to open the H5P test page in a modal window (off-canvas, whatever) using ajax.
5) repeat this again
6) reload the AJAX reference page and repeat 4 and 5.

Step 4 works OK, step 5 doesn't.

Note

This seems to be an ancient issue that is already reported for v7 version of the module. While some patches were proposed that apparently resolve the issue, this apparently wasn't acceptable because it touched the code that is supposed to be the same across different platforms. See "Error loading H5P via AJAX" for more information

🐛 Bug report
Status

Active

Component

Code

Created by

🇦🇹Austria Deno

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇫🇮Finland Anaconda777

    Hi,

    Facing the same problem.
    Basically, it is easy to reproduce like this with NG lightbox module for example.

    Prerequisites
    1. List H5P content using views
    2. Configure NG lightbox to open H5P content to a modal window (core modal)

    repeat the problem:
    1. Click a H5P link which opens H5P content to a modal = All is working
    2. Close the modal
    3. Click again, any H5P link which opens it to a modal. = H5P content does not load, the other fields of that page is visible.

Production build 0.69.0 2024