- Issue created by @jakegibs617
- 🇳🇱Netherlands koosvdkolk
This is how my colleague got it to work in D10 (so without Composer):
- You download https://www.drupal.org/project/h5p/releases/2.0.0-alpha3 → and put is somewhere into web/modues manually
- You add "h5p/h5p-core": "1.24.4" "h5p/h5p-editor": "1.24.4" via composer
- You apply patch https://www.drupal.org/files/issues/2023-06-27/drupal.org_files_issues_2... →
- Go to web/modules/.../h5p/src/H5PDrupal/H5PDrupal.php:241 and replace
$cachedAsset = $optimizer->optimize($assets);
with this
$cachedAsset = $optimizer->optimize($assets, []);
- You install h5p and h5peditor modules
- Add an h5p reference field to any content type
- Select h5p editor widget (it will support both editing and uploading this way)
- It'll still throw warnings on uploads and deprecation errors
- 🇺🇦Ukraine solariel
Unfortunately, this is tied to how drupal.org automatically injects composer requirements by checking the .info.yml of the module. Until maintainers update the info file noone will be able to do anything. For now the only way to install h5p on D10 is manually with applying patches from https://www.drupal.org/project/h5p/issues/3329297 📌 Automated Drupal 10 compatibility fixes Needs review
- 🇺🇸United States jakegibs617
oof. Yeah, I was able to bypass this so far by downloading the files directly and tracking them... But obviously, this is a pain and breaks how I build my Drupal app. Generally, I leverage the
composer install
command when building, but until they release an updated version it seems I am stuck with bad practices - 🇨🇦Canada ryanrobinson_wlu
+1
Our "go / no go" date for a Drupal 10 update is Aug 18th. If H5P doesn't have a Drupal 10 release by then, we won't be able to update as hoped before the new school year brings in a lot more traffic. Everything else is lined up.
I'd love to at least hear from the maintainers if this is likely to happen or not so we can plan accordingly.
- 🇨🇦Canada ryanrobinson_wlu
Does this project have a maintainer? We missed our last hopeful update date, but have one more opportunity coming up in early October before the Drupal 9 end of life. It would be wonderful if there was a version with Drupal 10 support by then, incorporating a lot of the patches that have been provided. Even if there are some edge case bugs, that would probably be better than being stuck on Drupal 9 past the EOL.
- 🇺🇸United States pdxclankeith
For modules that need a patch to make core_version_requirement include ^10, you need to install the composer lenient endpoint fix. Dependencies are checked before patches are applied, so the H5P module will not pass the Drupal core version requirement check until the patch marking it as D10 compatible is merged into the module. Using the composer lenient endpoint fix tells composer to ignore the core version requirement and allows the module to be included and then patched.
Information on this can be found here: https://www.drupal.org/docs/develop/using-composer/using-drupals-lenient... →
To allow the H5P module to be installed with composer on Drupal 10, you need to require "mglaman/composer-drupal-lenient": "^1.0"
and then add:"drupal-lenient": { "allowed-list": ["drupal/h5p"] }
in the "extra" section of the composer file.
- 🇨🇦Canada ryanrobinson_wlu
Thank you @pdxclankeith! This is a very helpful tool that I was not aware of.
I was starting to fork the H5P module into my own repository and have my composer pull from that instead, but this is much better. It will be easier to switch back to the official repository if/when there is a proper release, and it is easier to keep track of which patches are applied.
- 🇺🇸United States pdxclankeith
@ryanrobinson_wlu glad it helped. I've recently found that very useful on a number of Drupal 10 upgrades I've been doing.
- Status changed to Fixed
about 1 year ago 7:25pm 1 November 2023 ShaunDychko at College Physics commented 4 days ago
"The latest 2.0.x dev release supports Drupal 10."
It does not work for me!
Local Drupal site on Windows 11 - PHP 8.1.13 - Database Version 8.0.27 MySQL- Firefox browser - Drupal version 10.1.6 - H5P version 2.0.x-dev.
I have installed H5P version 2.0.x-dev (manually); in Structure/Content Types I have created a new H5P content as usual. I can create a new H5P content and save it, but... only the page title is displayed (and the label of my H5P Drupal content under that title) , NOT the H5P content itself! No errors in the browser console.
Any ideas?- 🇫🇮Finland anaconda777
I have exactly same problem as #13 with Drupal 10.1.6 and in composer "drupal/h5p": "2.0.x-dev@dev",
The editing works, but displaying any H5P content shows just empty page with title. I'm pleased to report that h5p 2.0.0-alpha4 works! Just downloaded and installed on my local installation of Drupal 10... works as expected.
Now looking forward to a definitive 2.0.0 version.Automatically closed - issue fixed for 2 weeks with no activity.