Bug in H5P in Wordpress
Hello, im using H5P with wordpress and im having a fatal bug, the content is not loading correctly, only its loaded the first time you see a page with H5P content, the rest of the times you display a page with H5P content it will not display.
I have found this differences in HTML with pages when it loads correctly and when it dont:
Correct display : <iframe id="h5p-iframe-2" class="h5p-iframe h5p-initialized" data-content-id="2" style="height: 474px;" src="about:blank" frameborder="0" scrolling="no"></iframe>
Wrong display: <iframe id="h5p-iframe-2" class="h5p-iframe" data-content-id="2" style="height:1px" src="about:blank" frameborder="0" scrolling="no"></iframe>
There are more differences, in the wrong one it looks like there is a wrong value returned by a funcion because in the corrct one you found this line :
"<script>H5PIntegration = ...... "
But in the one that dont display the content this line is non existent.
If you need URLs of my site I can show them in private.
Thanks for your help
Mon, 08/31/2015 - 01:00
Hello, I reasearched more my
Hello, I reasearched more my problem and its related with another plugin I use that works in Ajax mode, so the H5P content is not reloaded in AJAX pages, is there a way to fix this??
Mon, 08/31/2015 - 05:14
I have found a fix for my
I have found a fix for my problem, to insert the H5P content you should not use the shortcode but insert the HTML code to embed the H5P content.
BTW Thanks a lot for your plugin, is great I think.
Wed, 09/02/2015 - 09:13
Yes, unfortnuatly H5P doesn't
Yes, unfortnuatly H5P doesn't work with AJAX straight out of the box. The problem is that the H5P Content need to be "started" after it's inserted into the page. That means that the script running the AJAX have to trigger H5P.init(newNode) to initialize the H5P content.
Wether you can use the shortcode or you have to write the HTML, also depends on the plugin running the AJAX. It's the plugin's job to make sure any shortcodes are converted, but unfortnuatly not all plugins do support shortcodes in their AJAX content.
If shortcodes aren't supported I would try reporting this to the plugin author, or see if there are any issues concerning it.