Validation error when updating a node

Created on 8 May 2020, about 4 years ago
Updated 9 January 2023, over 1 year ago

When editing a node that has H5P content, there is a validation error and the node can't be saved. The validation error is:

Something unexpected happened. We were unable to save this content.

This is coming from line 95 of H5PEditorWidget.php:

  public function validate($element, FormStateInterface $form_state) {
    // Check that this is the latest version of the content type we have
    $core = H5PDrupal::getInstance('core');
    if ($core->h5pF->libraryHasUpgrade(\H5PCore::libraryFromString($element['#value']))) {
      // We do not allow storing old content due to security concerns
      $form_state->setError($element, t('Something unexpected happened. We were unable to save this content.'));
    }
  }

I'm trying to debug this, but don't fully understand the cause.

πŸ› Bug report
Status

Needs review

Version

2.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom blairski

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.

  • πŸ‡©πŸ‡ͺGermany ARUN AK

    From the mentioned code in the issue description it is clear that H5P is trying to verify is there any new version available.

    Hence to resolve this issue you need to upgrade the H5P package to the latest version.

    To upgrade the package, go to /admin/content/h5p and click the upgrade icon (Green Up Arrow) of the package that causing problem and complete the upgrade process, which will solve the issue.

Production build 0.69.0 2024