Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • D Drupal
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 53
    • Issues 53
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Development
  • Drupal
  • Issues
  • #32
Closed
Open
Created Oct 10, 2018 by JonGold@JonGoldDeveloper

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.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking