CKEditor completely breaks with the following JS error:
GET http://[sitename]/sites/all/modules/contrib/linkit/editors/ckeditor/%base_path%sites/all/modules/contrib/linkit/editors/ckeditor/linkit.png 400 (Bad Request)
on /admin/config/content/ckeditor/edit/Full page. Somehow plugin generates the button path incorrectly (%base_path%) and instead of the linkit icon there is a "null" value.
I believe that as a result of the above error CKEditor does not work on node edit forms anymore and returns the following JS error: "Uncaught TypeError: Cannot read property 'icons' of null"
Modules being used:
- Linkit 7.x-3.x-dev
- CKEditor 7.x-1.12
- CKEditor library (4.0)
This issue does not arise in Linkit 7.2 branch.
Comment | File | Size | Author |
---|---|---|---|
#8 | hook_ckeditor_plugin.txt | 383 bytes | stoickthevast |
#8 | plugin.js_.txt | 896 bytes | stoickthevast |
Comments
Comment #1
anonLinkit (7.x-3.x) is not responsible for the integration with the ckeditor module.
Ckeditor module has its own implementaion for Linkit.
Comment #2
mkesicki CreditAttribution: mkesicki commentedThank you for reporting this issue. We try check this as soon as possible.
Comment #3
7wonders CreditAttribution: 7wonders commentedgetting the icon to show in the admin is an easy fix:
'icon' => 'linkit.png'
but linkit integration still seems to be broken with:
linkit 7.x-3.x-dev
ckeditor 7.x-1.12+9-dev
Comment #4
anonThe bug exists in the ckeditor module for sure.
Linkit 7.x-3.x (2013-Mar-06) doesn't implement the hook_ckeditor_plugin() and the choose to use Linkit is still in the ckeditor settings.
This means that someone is doing some magic stuff, and in this case it is the Ckeditor module.
I have implement hook_ckeditor_plugin() in Linkit and this will "fix" it, but the error in the CKeditor still exists.
Comment #5
wwalc CreditAttribution: wwalc commentedThanks anon for fixing it in the Linkit module. Indeed it looks like there is a problem with ckeditor_plugins_render() function that corrects the path property only.
In this particular case, the path to an icon is incorrect:
so it looks like all placeholders in "icon" entries should be replaced as well.
Comment #6
stoickthevast CreditAttribution: stoickthevast commentedIm also experiencing this error
when I enable my custom plugin.
Comment #7
wwalc CreditAttribution: wwalc commentedAny chance to get your plugin to check what's wrong?
Comment #8
stoickthevast CreditAttribution: stoickthevast commentedMy plugin is working when others plugin is disabled, but when I enabled any of them it throws JS error.
The structure of my plugin