I ran into a surprising fatal error when enabling the CSP module:
Drupal\Core\Asset\Exception\IncompleteLibraryDefinitionException: Incomplete library definition for definition 'php-markdown' in extension 'markdown' in Drupal\Core\Asset\LibraryDiscoveryParser->buildByExtension() (line 91 of E:\Web\Ambient.Impact\Web\drupal\core\lib\Drupal\Core\Asset\LibraryDiscoveryParser.php).
I don't know why the CSP module is triggering this, but after taking a look at markdown.libraries.yml
, I'm guessing that the php:
keys are the problem because changing them to a presumably valid js:
fixes the error. Note that I'm using Composer, so I don't think the module is using the library definitions in this file for me, but this may break for anyone having manually installed it. I figured I should share this in case anyone else runs into this. I believe the file is supposed to be removed in 8.x-2.x, so that should also fix it whenever that happens. Feel free to close this, maintainers.
Comments
Comment #2
markhalliwellAll libraries should be installed via Composer.
See #2898331-22: Needs better documentation on how to add external PHP library for further information.
Comment #3
markhalliwellComment #4
Ambient.ImpactThanks!