Unable to find constructor for: H5P.Blanks 1.12

Created on 21 June 2021, about 4 years ago
Updated 22 May 2025, 3 months ago

Problem/Motivation

On a D8 Opigno install, the Fill in the Blank answer type will not display. It can be edited normally, but when loading for an end user, we get the following error:

Uncaught TypeError: can't access property "prototype", Question is undefined
    Blanks http://XXXX/sites/default/files/h5p/libraries/H5P.Blanks-1.12/js/blanks.js?quqylu:123
    <anonymous> http://XXXX/sites/default/files/h5p/libraries/H5P.Blanks-1.12/js/blanks.js?quqylu:924
blanks.js:123:3
Uncaught TypeError: can't access property "Cloze", Blanks is undefined
    <anonymous> http://XXXX/sites/default/files/h5p/libraries/H5P.Blanks-1.12/js/cloze.js?quqylu:17
    <anonymous> http://XXXX/sites/default/files/h5p/libraries/H5P.Blanks-1.12/js/cloze.js?quqylu:231
cloze.js:17:3
Unable to find constructor for: H5P.Blanks 1.12 h5p.js:976:13
    error http://XXXX/modules/contrib/h5p/vendor/h5p/h5p-core/js/h5p.js?v=1.0:976
    newRunnable http://XXXX/modules/contrib/h5p/vendor/h5p/h5p-core/js/h5p.js?v=1.0:895
    init http://XXXX/modules/contrib/h5p/vendor/h5p/h5p-core/js/h5p.js?v=1.0:137
    jQuery 2
    init http://XXXX/modules/contrib/h5p/vendor/h5p/h5p-core/js/h5p.js?v=1.0:93
    <anonymous> http://XXXX/modules/contrib/h5p/vendor/h5p/h5p-core/js/h5p.js?v=1.0:2821
    jQuery 11
Uncaught TypeError: can't access property "getCopyrights", instance is undefined
    getCopyrights http://XXXX/modules/contrib/h5p/vendor/h5p/h5p-core/js/h5p.js?v=1.0:1115
    init http://XXXX/modules/contrib/h5p/vendor/h5p/h5p-core/js/h5p.js?v=1.0:174
    jQuery 2
    init http://XXXX/modules/contrib/h5p/vendor/h5p/h5p-core/js/h5p.js?v=1.0:93
    <anonymous> http://XXXX/modules/contrib/h5p/vendor/h5p/h5p-core/js/h5p.js?v=1.0:2821
    jQuery 11

Steps to reproduce

  • Install Opingo
  • Add a Fill in the Blank activity
  • Add activity to a module
  • Try to load the activity

The activity never loads, and the Loading spinner never stops.

The error seems similar to the one for a different H5P component: https://www.drupal.org/project/h5p/issues/3169008 β†’

The remedy there to turn off JS aggregation did not help here.

πŸ› Bug report
Status

Active

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States ironsizide

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.

  • i have the same issue. anyone fix this?

  • Suggest closing: Fill in the blanks works in D11 with H5P module alpha6. Issue is 4 years old. Not clear if Opigno is relevant.

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

    I may need more info to help with debugging. As far as I understand it, Opigno manages the version and installation of this module as well as the h5p libraries. If the activity type works ok in this module without Opigno my instinct is to direct support requests to the Opigno module directly. If anyone has more info on how this module needs to adapt to support Opigno that is useful too!

Production build 0.71.5 2024