/src/Plugin/CKEditorPlugin/MediaEmbedButton.php defines an absolute path to the mediaembed library that presumes any site using the module is running from the top level of a given domain:
$path = '/libraries/mediaembed';
A consequence of this is that if a site is running from, for example, a sub folder, the module will be unable to locate the CKEditor library it needs.
This issue can be reproduced by serving a site from a sub folder, e.g., http://localhost:8888/drupal-sandbox/web, and attempting to configure a text format, e.g., http://localhost:8888/drupal-sandbox/web/admin/config/content/formats/ma.... In this context, it is impossible to add the mediaembed button to an editor, because CKEditor JS loader can't find it. The specific error in the browser console is:
Uncaught Error: [CKEDITOR.resourceManager.load] Resource name "mediaembed" was not found at "/libraries/mediaembed/plugin.js?t=H7NE".
This is probably just a matter of using base_path() in the path definition, which I am happy to submit as a patch.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 2941126-plugin-library-cannot-be-found.patch | 539 bytes | acephale |
Comments
Comment #2
acephale commentedComment #3
acephale commentedComment #5
hongpong commentedThank you @acephale , I tagged release 8.x-1.0-alpha2 with your fix today!