Issue #3526414: fixes to Drupal 11 console errors caused by invalid content script values
Closes #3526414
Problem
A refactor to the way H5P library scripts are passed to drupalSettings resulted in browser console errors and the Game Map interactive no longer working.
Changes
- The values in
$all_js
are now checked to make sure that thedata
value is a string. This avoids passing in a Drupal settings array that broke a function in the Game Map interactive JS code. - The paths are also passed through the
file_url_generator
service'sgenerateAbsoluteString()
method to ensure they are absolute paths. Relative pathing breaks the loading of the those files in some cases.