Clarification: Upgrading Libraries and Backwards Compatibility with Existing Content

Created on 31 March 2022, over 3 years ago
Updated 4 August 2025, 8 days ago

Problem/Motivation

First, let me say I am blown away by H5P and what I have demo'ed to various stakeholders, they too have been so. Thank you for everyone's efforts in the Drupal module and the software at large!

Context: We are going to set up the Drupal module on an enterprise site, add the H5P field to a custom block type that we will place H5P content in the Layout Builder. We are going to use the Editor Hub to allow our content creators/managers to create the H5P content right in Drupal rather than create h5p file elsewhere and upload it.

What I am trying to better understand is the relationship between keeping libraries up-to-date, existing content, and backwards compatibility. I saw a note on this here: https://h5p.org/documentation/setup/drupal8 where it says

Updating old content to new versions can change their appearance and functionality significantly, preserving old content through library upgrades is always one of the main focuses of a library developer. Be aware of possible versioning and content upgrades issues when letting users upload altered H5P libraries.

I want to try to get ahead of this before we release this in the 'wild.'

Let's say I:

  • Created an Image Hotspot piece of content in our block that uses the H5P field and is placed on a page in the Layout Builder. Then, the library has an update.
  • I update the library in the admin menu at /admin/content/h5p.
  • First Question: Does that new library now apply to all Image Hotspot pieces of content? Or, does the existing Image Hotspot content use the old libraries when it was first created?
  • Second Question: Will we ever need to recreate or resave, in this example, all the Image Hotspots to basically unbreak or update content when there is a new library update for a H5P content type? I realize this is a bit of general question, but any clarification would be helpful from people's experiences. I am trying to anticipate if there is a situation where we basically have to resave or rebuild H5P content when we do a library update.

I am marking this issue as documentation as I trying to piece together a bit of threads from the Drupal Issue Queue and the H5P forums itself, but some of those are related to the Moodle or Wordpress plugins. Thank you so much for any clarifications or pointers to threads or other documentation I might have missed.

Steps to reproduce

N/A

Proposed resolution

If there is clarification on backwards compatibility and a best practice to updating libraries that explicitly deals with existing content, it might be nice to call it out in the module's documentation as a best practice or something to anticipate.

Remaining tasks

N/A

User interface changes

N/A

API changes

N/A

Data model changes

N/A

πŸ’¬ Support request
Status

Active

Version

2.0

Component

Documentation

Created by

πŸ‡ΊπŸ‡ΈUnited States JackG102 Falls Church, VA

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.

Production build 0.71.5 2024