First off all, thank you for this great module. I’m using the Advagg Modifier for loading CSS with JS via the library loadCSS. I use the option “Inline javascript loader library (if enabled this is recommended)”. Everything works fine, except when I disable the module in the UI or in settings.php $config[‘advagg.settings’][‘enabled’] = FALSE. Drupal is returning a blank page.
I dug a little bit deeper to find the source of the problem and found a bug in “\Drupal\advagg_mod\Asset\DeferCss” line 71. A variable $pattern is set with a path to the “loadCSS.js” file. But the path contains forward slashes and so the preg_replace_callback matches 0. Given $content is returning NULL. The solution I’ve found is to escape the forward slashes.
| Comment | File | Size | Author |
|---|---|---|---|
| proper_defer_css_path_escaping.patch | 534 bytes | martijn snapper |
Comments
Comment #3
nickdickinsonwildeTHanks for the report and patch - and patience. Commited.