On Drupal 7 H5P version 7.x-1.53 bug

papi Jo's picture
Forums: 

I appreciate that Drupal 7 is old stuff, but I still need to use it for my H5P developements, pending a better solution... which has been promised for a number of years but has not materialized yet.

Found a curious "bug" in current version release 7.x-1.53 - 16 January 2024 of H5P for Drupal 7. It works as expected, I can create, edit and save H5P contents. But those contents I create in Drupal 7 trigger errors when saved and then downloaded to other platforms (such as Moodle, Wordpress or Lumi). After investigating I discovered that ---with Drupal H5P 7.x-1.53--- the H5P libraries used by the H5P contents are saved with the full 3 libary numbers added to their names, i.e. majorVersion, minorVersion and patchVersion. In all other platforms and versions (including previous releases of H5P for Drupal) only majorVersion and minorVersion numbers are included in the names.

Examples

  • in "normal" H5P releases, the libraries included in created H5P contents follow this naming pattern:
    [FontAwesome-4.5]
    [H5P.DragText-1.10]
    [H5P.Fontlcons-1.0]
    [H5P.JoubelUI-1.3]

  • with Drupal H5P 7.x-1.53 the libraries included in created H5P contents follow this naming pattern:
    [FontAwesome-4.5.4]
    [H5P. Font Icons-1.0.6]
    [H5P.Image-1.1.22]
    [H5P.JoubelUI-1.3.19]

  • Not sure this forum is the best place to report this bug, but I hope someone from the H5P dev team will eventually be made aware of the problem and provide a fix.
otacke's picture

The H5P CLI tool has been refurbished and could be used to develop for a year or so, I guess. It still has some things that could be (and will be as far as I understood) improved, but it's fully functional.

Not sure if your observartion is a but. The scheme was changed deliberately (for reference: the internal ticket id at H5P Group is JI-3485 that you will find in the respective commits in the H5P core repositories). The issue may just be that not all H5P integrations have been shipped with the proper version of H5P core that will understand that scheme - or that there's in fact some routine that was not migrated to handle the patch version as well.

papi Jo's picture

1.- "The H5P CLI tool has been refurbished and could be used to develop..." OK, I'll give it a try!

2.- "The scheme was changed deliberately (for reference: the internal ticket id at H5P Group is JI-3485 that you will find in the respective commits in the H5P core repositories)." No idea where exactly to find a reference to this ticket JI-3485.

otacke's picture

In the commit messages of the respective commits to the H5P core that introduced the changes:

  • https://github.com/search?q=repo%3Ah5p%2Fh5p-php-library+JI-3485&type=commits
  • https://github.com/search?q=repo%3Ah5p%2Fh5p-editor-php-library+JI-3485&type=commits

Doesn't look like some unwanted change, does it? 

We're getting an error when trying to download/upgrade the H5P content types in Moodle.

After looking at it, we've seen you've added the patched version to the H5P.Column library and this is causing the errors because the current H5P API doesn't support it (at least, the isValidPackage() method in h5p.classes.php).

More information can be found in https://tracker.moodle.org/browse/MDL-81717 :-)

otacke's picture

This is an issue on h5p.org. The patch version number is not supposed to be part of the directory name. Might be that H5P Group is planning to release Column 1.17 shortly anyway, as the minor version was bumped today.

papi Jo's picture

Problem is now solved!

otacke's picture

Heureka!

Great news! Thanks :-)