After updates Drupal Core from 8.6 to 8.8.4 I get the error:
Drupal\libraries\ExternalLibrary\Exception\LibraryDefinitionNotFoundException: The library definition for the library 'font' could not be found. in Drupal\libraries\ExternalLibrary\Definition\FileDefinitionDiscoveryBase->getDefinition() (line 50 of /var/www/drupal/public_html/docroot/modules/contrib/libraries/src/ExternalLibrary/Definition/FileDefinitionDiscoveryBase.php).
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | ckeditor-font-definition-error-3122403-2.patch | 3.19 KB | anna d |
Comments
Comment #2
anna d commentedIt works for me for 8.x-1.x-dev
Comment #3
WebbehThanks for sharing, Anna. Are you using the Libraries API module to load in third-party libraries?
This would be a good opportunity for this module to tighten up the libraries definition:
I guess it's failing because it sees the Libraries API module loaded, but the font plugin isn't loaded through there. Does that sound like what is happening on your end?
Happy to do testing on the 1.x-dev version to confirm this is what's happening, and see if that logic can be tightened up to properly return the $path if the font plugin exists.
If anyone knows of a good module using the libraries_api to pull a library in on install, please share it. I'd love to build off of what's already working out in contrib space.
Comment #4
WebbehSo, after some poking around documentation, libraries_api issue list, I am in favor of the patch as seen in #3122403-2: The library definition for the library 'font' could not be found. in Drupal\libraries\ExternalLibrary\Definition\FileDefinitionDiscoveryBase->getDefinition() to deprecate out the libraries_api functionality for now.
Drupal 8 support of libraries_api is a work-in-progress, despite the beta reklease: #2605194: [libraries] Libraries API
There's an open support issue regarding CKEditor plugins, as they're not defined in the central repo of 3rd party PHP libraries: #2981687: Will libraries API 3.x support automatic download of Contributed CKEditor plugins?
I think there's also some meta considerations of what the 8.x-3.x branch of libraries_api should accomplish: #3039570: Plan for a "less ambitious" version of D8 Libraries API
I attempted to shore up the logic around the libraries.manager call, but the current libraries_api implementation causes a white-screen of death (WSOD) if it can't locate the entry. I'm hesitant to go in that direction if there's an inability to pipe in a new entry for supporting ckeditor's font plugin entry.
Can anyone with a bit more knowledge in this area chime in and see if moving away from libraries_api support is an appropriate response?
Comment #5
duneblI confirm that #2 is doing the job... many thanks!!!
Comment #6
WebbehComment #8
Webbeh