🇳🇿New Zealand lightweight
🇳🇿New Zealand lightweight
lightweight → created an issue.
🐛 | H5P - Create and Share Rich Content and Applications | Content not served on HTTPS sites due to HTTP urls for assets
🇳🇿New Zealand lightweight
Ok - after upgrading my D9 site to D10.2.6, I've run into the same problem with http:// being used for H5p javascript assets. The fix that worked for me is a modification of the above H5PDrupal.php_.patch updated via this: https://www.drupal.org/node/2940031 →
- return array_map(function($publicUrl){ return \Drupal::service('file_url_generator')->generateAbsoluteString($publicUrl); }, array_column($cachedAsset, 'data'));
+ return array_map(function($publicUrl){ return \Drupal::service('file_url_generator')->generateString($publicUrl); }, array_column($cachedAsset, 'data'));
It just involves removing the 'Absolute' from generateAbsoluteString.