Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When I enabled "Deferred CSS Execution: Use JS to load CSS" in head I got an error:
Exception: Invalid JS asset type. in Drupal\advagg\Asset\JsCollectionRenderer->render() (line 102 of /code/modules/contrib/advagg/src/Asset/JsCollectionRenderer.php).
After debugging module I checked out that the code in the hook alter in AdvAgg_mod uses hardcoded path to module's JS and CSS files.
I changed path with drupal_get_path() function and created a patch.
Comments
Comment #2
Archual CreditAttribution: Archual at Cold Brain commentedAttached patch.
Comment #3
Archual CreditAttribution: Archual at Cold Brain commentedComment #8
Archual CreditAttribution: Archual at Cold Brain commentedComment #9
Archual CreditAttribution: Archual at Cold Brain commentedI fixed patch.
Comment #10
NickDickinsonWildeComment #15
NickDickinsonWildeAh I see... slightly odd patch file - doesn't include the full path to the changed file.
Comment #17
NickDickinsonWildeComitted, thanks for the patch!
Comment #19
matsbla CreditAttribution: matsbla commentedI experience a similar issue when I try to run update.php while "Deferred CSS Execution: Use JS to load CSS" is enabled.
I've opened an issue about it here;
https://www.drupal.org/node/2837012