Problem/Motivation
Cookies Asset Injector does not check if asset is enabled. Even disabled asset injector snippets are handles in Cookies Asset Injector.
I saw this because we're having the know issue:
Exception: Error trying to optimize JavaScript asset: sites/default/files/asset_injector/js/usetiful-0bd299061037d2e0e13e3a0f0aa9fce8.js. Only file JavaScript assets with preprocessing enabled can be optimized. in Drupal\Core\Asset\JsOptimizer->optimize()
in a client project where the related asset is disabled.
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork cookies-3565611
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
anybodyOkay I found and fixed the flaws. The parameters can be removed, they are not helpful for us and we can't pass them everywhere usefully. So let's remove them and add a missing check!
Comment #4
grevil commentedLGTM! The test fails, because of the Matomo submodule, which definitely has no dependencies on the asset injector cookies submodule.
Comment #6
grevil commented