unexpected error - h5p generated iframe embed code in Drupal 8

Created on 15 August 2018, almost 7 years ago
Updated 6 August 2025, 6 days ago

The H5P module is installed on Drupal 8.5.6 (theme used is a Barrio Bootstrap 4 subtheme)

The H5P module is creating and saving content without issues. However, after taking the embed code using the h5p embed button, the following error is the result once the code is placed in a document (locally and on other domains):

'The website encountered an unexpected error. Please try again later.'

The url included in the iframe uses the following path:
our-domain/h5p/133/embed

The default h5P package path was automatically set at installation and is 'h5p' which is present at the end of the sites/default/files path.

Sample urls were taken from h5p.org and a WordPress example for comparision:
https://h5p.org/h5p/embed/612

Both worked and have a different structure - 'embed' is before the file reference - not after.

Changing /embed and the reference around directly in the iframe code results in a different error message - the full page loads with the following:

'The requested page could not be found.'

The second url in the embed code for h5p-resizer.js is OK and displays the correct file.

The problem is how to confirm if the path for the content is the issue (and how to fix it), or if there are other configuration issues to consider.

I'm new to Drupal, so any guidance is much appreciated.

πŸ’¬ Support request
Status

Active

Component

Code

Created by

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.

  • πŸ‡ΊπŸ‡ΈUnited States illeace

    For clarity, the difference in embed paths is expected. Drupal's pattern is "[domain-name]/h5p/[entity-id]/embed". I'm using Drupal 11 and release 2.0.0-alpha6, and I have not seen this issue. If the original poster is still active and experiencing this, please let us know. Otherwise, given the age of the issue I suggest we mark it as "Closed (outdated)".

  • πŸ‡ΊπŸ‡ΈUnited States sim_1

    Closing as outdated. Please re-open if this issue is still happening for you.

Production build 0.71.5 2024