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.

Comments

martijnsnapper created an issue. See original summary.

nickdickinsonwilde’s picture

Status: Active » Fixed

THanks for the report and patch - and patience. Commited.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.