• Resolved larnoult

    (@larnoult)


    Hello,
    I’m an happy user of H5P; recently, embbeding quizzes through shortcodes stopped working consistently. Here is an exemple: https://pelico.parlemonde.org/reportage/a-la-croisee-des-indices/
    We’re running latest version of WordPress and H5P, as well as PHP 7.3.12
    The console shows this error, which I do not quite get (as a non developper!)

    Uncaught TypeError: Cannot read property 'open' of null
        at HTMLIFrameElement.<anonymous> (h5p.js?ver=1.15.0:381)
        at Function.each (jquery.js?ver=1.15.0:2)
        at init.each (jquery.js?ver=1.15.0:2)
        at Object.H5P.init (h5p.js?ver=1.15.0:379)
        at HTMLDocument.<anonymous> (h5p.js?ver=1.15.0:2821)
        at c (jquery.js?ver=1.15.0:2)
        at Object.fireWith [as resolveWith] (jquery.js?ver=1.15.0:2)
        at Function.ready (jquery.js?ver=1.15.0:2)
        at HTMLDocument.H (jquery.js?ver=1.15.0:2)

    I tried to use the Health Check & Troubleshooting plugin to play around theme and plugin conflicts; but with the default theme I cannot activate H5P (a notice says that its activation was prevented due to errors).
    Thanks!

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author icc0rz

    (@icc0rz)

    You have a plugin called page-scroll-to-id that crashes on page load, this will cause other components, like H5P content, to not get initialized properly.

    Thread Starter larnoult

    (@larnoult)

    Hey @icc0rz,

    Thanks a lot for your quick answer. I just desactivated page-scroll-to-id, but it didn’t change neither the (missing) output nor the console log error. https://pelico.parlemonde.org/reportage/a-la-croisee-des-indices/#5-quel-est-le-pays-myst%C3%A8re-
    Any other idea?
    Thank you!!

    Plugin Author icc0rz

    (@icc0rz)

    Great, that did actually fix the errors on the page. However, now there is a plugin deleting the H5P content from the iframe and trying to replace it with an image. I believe it’s the wp-smushit plugin, though, I’m not sure why it would be targeting the H5P iframe, maybe there’s a setting or it thinks that it’s something else. If you try deactivating it I’m sure you’ll see the H5P content.

    Thread Starter larnoult

    (@larnoult)

    Hello,
    Great!! Desactivating smush it did the trick (even while reactivating
    Page scroll to id). I’ll signal the issue to smush plugin dev team.
    As I’m always eager to learn, and not always as lucky as today with your amazing support, would it be possible in a few words to let me know how you were capable of spotting the “guilty” plugin?
    Cheers,

    Plugin Author icc0rz

    (@icc0rz)

    Great, I’m glad you got it working!

    Of course, it’s not always that all plugins will get along nicely. In this case likely because it was assumed that the content was something else than it was.
    Anyway, I right-clicked and chose ‘inspect element’ and found that the iframe tag was almost empty. Then I saw a class=”lazyload” had been added to the iframe as well. I opened the Sources tab and searched all files(Ctrl+Shift+F) for the phrase “lazyload”. The only hit I got was in a file belonging to that plugin.

    Thanks @icc0rz – we had exactly the same problem with the latest version of Smush.

    For anyone else who runs into this problem you can tell Smush to leave the H5P iframes alone using the Classes & IDs setting in the Lazy Loading section of the Smush dashboard. Just add .h5p-iframe to the list.

    That way you can still run Smush, including lazy-loading, without it breaking H5P.

    Plugin Author icc0rz

    (@icc0rz)

    That is great to hear, thanks for the tip!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘H5P quizz not showing up any more’ is closed to new replies.