Validation error when updating a node

Created on 6 August 2021, about 4 years ago
Updated 1 August 2025, 11 days 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

Active

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany b.schmidt@choice.de

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

    I have not been able to reproduce this issue in 2.0.0-alpha6. If the original issue creator is still active and learned more, please update with more detail steps for reproducing the error. Absent that, I suggest we mark this as "closed (outdated)".

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

    Hopefully this was resolved in more recent updates to the module. Marking as closed (outdated).

Production build 0.71.5 2024