H5p content files not exported when exporting the entities containing them with drush

Created on 19 July 2019, about 6 years ago
Updated 24 July 2025, 19 days ago

I try to create a profile of my site using the instructions of this link

https://www.drupal.org/docs/8/distributions/creating-distributions/how-t... β†’

When I try to export the default content, and this content has h5p fields, this data is not exported correctly, the h5p data is missing and there is this in the json file:

"field_h5p": [
{
"h5p_content_id": 55,
"h5p_content_revisioning_handled": null,
"h5p_content_new_translation": null
}
]

Possible reason:

I suppose that the table h5p_content misses the uuid field and therefore isn't properly exported.

πŸ› Bug report
Status

Active

Component

Code

Created by

πŸ‡ͺπŸ‡ΈSpain mmilaprat

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

    As of 2.0.0-alpha6, this behavior has changed slightly. When I export, I see "false" instead of "null" for two of the properties:

      field_h5p:
        -
          h5p_content_id: 24
          h5p_content_revisioning_handled: false
          h5p_content_new_translation: false
    

    I'm not sure this is incorrect, though. The H5P field is essentially an entity reference field. The h5p details live in the h5p_content entity (in this case with id 24). When I add other types of entity reference fields to my node and rerun the drush dce command, I see pretty much the same thing. The entity type, then the entity id.

      field_basic_page_ref:
        -
          entity: 72159ef7-a9a4-483d-9479-72dc7cc75902
      field_user:
        -
          entity: a427c576-15b8-4ad0-b2e3-c05f090752f8
    

    When I use drush to export the h5p entity with "drush dce h5p_content 24", I see much more information.

    _meta:
      version: '1.0'
      entity_type: h5p_content
      uuid: null
    default:
      library_id:
        -
          value: 77
      parameters:
        -
          value: '{"items":[{"image":{"params":{"decorative":false,"contentName":"Image","expandImage":"Expand Image","minimizeImage":"Minimize Image","file":{"path":"images\/file-687921261e194.gif","mime":"image\/gif","copyright":{"license":"U"},"width":189,"height":148},"alt":"Eye roll"},"library":"H5P.Image 1.1","subContentId":"53c4a90b-9b13-4680-a274-cde11bc95323","metadata":{"contentType":"Image","license":"U","title":"Untitled Image","authors":[],"changes":[]}},"description":""},{"image":{"params":{"decorative":false,"contentName":"Image","expandImage":"Expand Image","minimizeImage":"Minimize Image","file":{"path":"images\/file-68792139c2bfb.jpg","mime":"image\/jpeg","copyright":{"license":"U"},"width":271,"height":188},"alt":"Texas longhorn"},"library":"H5P.Image 1.1","subContentId":"46368d31-fa35-40ec-bd06-a127679f5d90","metadata":{"contentType":"Image","license":"U","title":"Untitled Image","authors":[],"changes":[]}},"description":""}],"behaviour":{"startImage":1,"snap":true,"ticks":false,"labels":false,"transparencyReplacementColor":"#000000","imagesDescriptionsRatio":70},"a11y":{"image":"Image","imageSlider":"Image Slider","mute":"Mute, currently unmuted","unmute":"Unmute, currently muted","buttonFullscreenEnter":"Enter fullscreen mode","buttonFullscreenExit":"Exit fullscreen mode"}}'
      disabled_features:
        -
          value: 0
      title:
        -
          value: Agamotto!
      authors:
        -
          value: '[]'
      license:
        -
          value: U
      changes:
        -
          value: '[]'
      default_language:
        -
          value: en
    

    Even though this seems to work as expected, there will still be issues, since the JSON in the "value" field above refers to image files that aren't going to be available to the Default Content module. Ultimately, this sounds like a difficult feature to support, and since H5P already has it's own system for downloading an H5P as a package from one site and uploading it to another, it's a bit hard to justify getting this fully working IMO.

Production build 0.71.5 2024