Drupal8: Can't add JS resources to footer
This manifests most obviously with Shoreditch - some JS is intended to load in page-footer
and fails.
This was first documented as CRM-21374(https://github.com/civicrm/civicrm-core/pull/11504#issuecomment-356837051), which was closed with a quick fix.
Also related are civicrm-core#11504 which removes the D8 addScriptUrl()
function. It seems to be relying on drupal#504 to add scripts to the header, but not to the footer.
@dsnopek mentioned in passing that CiviCRM D8 can't yet add resources to the footer.
Fixing this requires an understanding of D8 Services, which I don't have. It seems like the CivicrmPageState
class needs a different data structure for $js
. Whether that's a separate $jsFooter
property or a multidimensional array I'm not sure.