Missing iframe height after updating to newer version

Created on 22 May 2025, about 2 months ago

So far I have used the h5p module in dev version at commit df0872a9 (March 2024) ...
and I applied this patch
"Support h5p/h5p-core:1.26 and h5p/h5p-editor:1.25": " https://www.drupal.org/files/issues/2024-02-14/support-h5p-1.26-3420268-... ".

So far everything was okay.

After updating the module to newer versions of dev or latest version (commit e1243af4), the h5p field is no longer displayed correctly.

The problem:
The height style of the h5p iframe is missing!

Before:

After updating:

In my case:
iframe height = 392px is missing. Thats why the h5p content is not displayed correctly.

How can I find out the reason?
Where in the JS code is the iframe height dynamically set?

Please help me to write a patch for this problem.
Older versions (commit df0872a9 (March 2024) and before work correct, newer versions (without the mentioned patch) do not have the height applied.

Need a solution.
Thank you.

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇦🇹Austria drupalfan2

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

Comments & Activities

  • Issue created by @drupalfan2
  • 🇨🇦Canada ydahi Waterloo, Canada

    Hi @drupalfan2,

    I'm attempting to reproduce this error on a fresh install of h5p 2.0.0-alpha5 on Drupal 10.4.7.

    So far I am not able to recreate the error you are seeing:

    • Height is dynamically added to iframe in the style attribute
    • The h5p is rendered properly

    Can you provide more info about your setup? What content type are you building?

    You should also try a fresh install as well to see if you can recreate this issue yourself on a vanillla install.

  • 🇦🇹Austria drupalfan2

    This is an issue concerning "Active Surface" (see related issue). Where is the option to enable or disable "Active Surface" in an existing H5P content?

    I think:
    Before updating an H5P content with Active Surface enabled must be created.
    Now the update has to be done.
    Afertwords the error "Cannot read properties of undefined (reading 'activeSurface')" may or can appear as it does in my case.

    Thank you

Production build 0.71.5 2024