After upgrading to 7.1.11 - ckeditor no longer shows up and there are 2 uncaught exceptions. The above is the first one - the other is:

uncaught exception: [CKEDITOR.editor] The instance "edit-body-und-0-value" already exists. This error seems to be resolved by dis-abling the wysiwyg module - though they worked well together in 7.1.9

I use thelibaraies module and the ckeditor itself is installed in the libraries directory.

This was working fine in 7.1.9

Comments

mkesicki’s picture

Status: Active » Postponed (maintainer needs more info)

CKEditor module and WYSIWYG module are not compatible. They can not work well together.
You should disable Wysiwyg module if you wish to use CKEditor module.
Wysiwyg module turns off our module automatically...
Which version of CKEditor library do you use ?
Please clear drupal and browser cache.

letapjar’s picture

Did allof those things - thanks.

The drupalbreaks issue has nothing to do with wysiwyg module. As I mentioned - I turned off wysiwyg and still had the drupalbreak issue (after clearing caches etc.) the double slash in front of "sites" may be causing the error? I have no idea where in the code this is being called.

I'm using the same version of CK editor that worked with version 7.1.9 of this module: 3.6.5

for now I've reverted back to 7.1.9 as this was working fine for me.

mkesicki’s picture

If you can, please check with latest version, if you have any errors reported in admin status report page.
You can also try disable teaser plugin in CKEditor module configuration. Of course , I write about latest version of CKEditor module.

derikson’s picture

I'm experiencing this problem as well, using the ckeditor 4 git checkout. I've narrowed the problem down to commit 54ce0f9c186055af48e729ccf682e70f47db3b13 . It looks like the extra slash at the start of the path is breaking it.

caktux’s picture

Having the same issue, not using wysiwyg module at all. derikson's solution worked for me.

Marshall_Kennard’s picture

Here are the errors from Chrome, all pointing to a broken URL:

Failed to load resource http://sites/all/modules/ckeditor/plugins/drupalbreaks/plugin.js?t=C3HA5RM
Failed to load resource http://sites/all/modules/ckeditor/ckeditor/plugins/tableresize/plugin.js...
Uncaught [CKEDITOR.resourceManager.load] Resource name "drupalbreaks,drupalbreaks" was not found at "//sites/all/modules/ckeditor/plugins/drupalbreaks/plugin.js?t=C3HA5RM". /sites/all/modules/ckeditor/ckeditor/ckeditor.js?mez74k:24
Failed to load resource http://sites/all/modules/ckeditor/plugins/drupalbreaks/plugin.js?t=C3HA5RM
Failed to load resource http://sites/all/modules/ckeditor/ckeditor/plugins/tableresize/plugin.js...
Uncaught [CKEDITOR.resourceManager.load] Resource name "drupalbreaks,drupalbreaks,drupalbreaks,drupalbreaks,drupalbreaks,drupalbreaks,drupalbreaks" was not found at "//sites/all/modules/ckeditor/plugins/drupalbreaks/plugin.js?t=C3HA5RM". /sites/all/modules/ckeditor/ckeditor/ckeditor.js?mez74k:24
Failed to load resource http://sites/all/modules/ckeditor/plugins/drupalbreaks/plugin.js?t=C3HA5RM
Failed to load resource http://sites/all/modules/ckeditor/ckeditor/plugins/tableresize/plugin.js...
Uncaught [CKEDITOR.resourceManager.load] Resource name "drupalbreaks,drupalbreaks,drupalbreaks,drupalbreaks,drupalbreaks,drupalbreaks,drupalbreaks" was not found at "//sites/all/modules/ckeditor/plugins/drupalbreaks/plugin.js?t=C3HA5RM". ckeditor.js:24

dczepierga’s picture

@Marshall_Kennard, which version of CKEditor do u use? GIT version?

indaloweb’s picture

in ckeditor 7.x-1.11 same problem

dczepierga’s picture

but which package of CKEditor v4 library do u use? one from website or from GIT repo?

indaloweb’s picture

I have trid with :
CKEditor 3.6.5 (10 Oct 2012)
CKEditor 3.6.4 (17 Jul 2012)

wodzik’s picture

Having the same issue. CKEditor 3.6.5 and 4.0

caktux’s picture

Please revert commit 54ce0f9c186055af48e729ccf682e70f47db3b13 from #1850626: [D7] Wrong path to external plugins loaded by hook

wwalc’s picture

Okay, I tried to reproduce it, to no avail. That slash was in fact causing a problem in a different case, so we need to be able to reproduce the error you have instead of just reverting that change.

Can you provide the following details?

1. CKEditor 3.6.5 or CKEditor 4.0? (standard package?)

2. From CKEditor global profile (admin/config/content/ckeditor/editg) the following details:

  • Path to CKEditor
  • Local path to CKEditor
  • Path to the CKEditor plugins directory
  • Local path to the CKEditor plugins directory

Please write both: the thing you have in text field and the value of "Current path:" written below each field.

3. The URL where Drupal is installed. You may use example.com instead of real domain. (e.g. the site is http://mysite.com you may just write it is http://example.com If Drupal is installed in a subfolder instead: http://mysite.com/blog/ then you may write: http://example.com/blog/)

4. Disable JavaScript aggregation and caching just to see if it helpded. Clear cache (in Drupal and in browser)

Marshall_Kennard’s picture

I tried different versions of CKEditor 3.6.x. The above post was using CKEditor 3.6.3.

The following errors are from CKeditor 3.6.5 standard release

GET http://sites/all/modules/ckeditor/plugins/drupalbreaks/plugin.js?t=C3HA5RM ckeditor.js:16
GET http://sites/all/modules/ckeditor/ckeditor/plugins/tableresize/plugin.js... ckeditor.js:16
Uncaught [CKEDITOR.resourceManager.load] Resource name "drupalbreaks,drupalbreaks,drupalbreaks,drupalbreaks,drupalbreaks,drupalbreaks,drupalbreaks" was not found at "//sites/all/modules/ckeditor/plugins/drupalbreaks/plugin.js?t=C3HA5RM". ckeditor.js:24

Here are the module config settings:
Path to CKEditor: %m/ckeditor
Current path: /sites/all/modules/ckeditor/ckeditor
Local path to CKEDitor: empty
Current path: ./sites/all/modules/ckeditor/ckeditor
Path to CKEditor plugins directory: %m/plugins
Current path: /sites/all/modules/ckeditor/plugins
Local path to CKEditor plugins directory: empty
Current path: ./sites/all/modules/ckeditor/plugins

Drupal is installed at the document root. http://example.com/
JavaScript aggregation and caching is not set. Tested on virgin Chrome browser.

derikson’s picture

I'm using CKEditor 4.0 from the git repository.

I get two errors:
"NetworkError: 500 Internal Server Error - http://localhost/all/modules/contrib/ckeditor/plugins/drupalbreaks/plugi..."
uncaught exception: [CKEDITOR.resourceManager.load] Resource name "drupalbreaks" was not found at "//sites/all/modules/contrib/ckeditor/plugins/drupalbreaks/plugin.js?t=CAPD".

Note, for the first error, I am not running Drupal from localhost, yet it's trying to load the plugin from localhost.

Path to CKEditor:
%l/ckeditor
Current path: /sites/all/libraries/ckeditor

Local path to CKEditor:
blank
Current path: ./sites/all/libraries/ckeditor

Path to the CKEditor plugins directory:
%m/plugins
Current path: /sites/all/modules/contrib/ckeditor/plugins

Local path to the CKEditor plugins directory:
blank
Current path: ./sites/all/modules/contrib/ckeditor/plugins

Drupal is installed at http://example.com

JavaScript aggregation is disabled, and clearing the cache didn't do anything.

In javascript, Drupal.settings.ckeditor.input_formats[1].loadPlugins.drupalbreaks.path is "//sites/all/modules/contrib/ckeditor/plugins/drupalbreaks/". I believe that extra slash at the beginning is causing ckeditor to try to load the plugin from localhost.

Marshall_Kennard’s picture

The problem appears to be an extra slash added to the path in includes/ckeditor.lib.inc line 538.
The slash is only needed if the ckeditor_base_path('relative') is not empty.

The following patch fixes it:

--- ckeditor/includes/ckeditor.lib.inc	2012-12-12 08:36:37.000000000 -0500
+++ web_root/sites/all/modules/ckeditor/includes/ckeditor.lib.inc	2012-12-14 16:58:34.907708000 -0500
@@ -535,7 +535,7 @@
  */
 function ckeditor_plugins_render($plugins) {
   $render = array();
-  $render["%base_path%"] = ckeditor_base_path('relative') . '/';
+  $render["%base_path%"] = ckeditor_base_path('relative') . (ckeditor_base_path('relative') ? '/' : '');
   $render["%editor_path%"] = ckeditor_path('relative') . '/';
   $render["%module_path%"] = ckeditor_module_path('relative');
   $render["%plugin_dir%"] = $render["%module_path%"] . '/plugins/';
jennypanighetti’s picture

#16 fixed it for me, THANKS!

janka’s picture

#16 didn't work for me (using CKEditor 3.6.3)

$render["%plugin_dir%"] containes the base path and then the pluggin is loaded from %base_path%%plugin_dir% making the base path appear twice in the URL.

Replacing
$render["%base_path%"] = ckeditor_base_path('relative') . '/';
with
$render["%base_path%"] = '';
in function ckeditor_plugins_render($plugins) in ckeditor/includes/ckeditor.lib.inc fixed the problem.

I'm no drupal expert and don't know if it will work with other editor versions.

BOGUƎ’s picture

#16 did the trick here too, thanks!

moreorless’s picture

Similar issue here. I'm using CKEditor 3.6.5, located in sites/all/libraries. After upgrading from module version 7.1.9 to 7.1.11 the editor vanishes. None of the span containers are loaded. Global settings for the module are:

Path to CKEditor - %l/ckeditor
Local path to CKEditor - blank
Path to the CKEditor plugins directory - %m/plugins
Local path to the CKEditor plugins directory - blank
Path to CKFinder - %m/ckfinder
Use toolbar Drag&Drop feature - enabled

Under Performance, caching and bandwidth optimization are all switched off.

Neither of the fixes at #16 and #18 resolve the problem.

I'm getting no discernible error notices.

Tried disabling a bunch of other modules (ckeditor link, diff, revisioning, cck, imce, fields, css injector) but with no effect.

Rolling back to 7.1.9 returns the editor.

Awesome_ian’s picture

Same problem.

Solved by changing skin editor and re-save ckeditor profil.
Editor came back !

dczepierga’s picture

Really thx all for help and feedback to fix this problem!

But i still cannot reproduce this... i don't understand one thing - how this patch $render["%base_path%"] = ckeditor_base_path('relative') . (ckeditor_base_path('relative') ? '/' : ''); can fix problem with e.g. drupalbreak plugin?
Drupalbreak plugin has path: %plugin_dir%drupalbreaks/, so it's not related with %base_path% flag, so how can fix problem with it? Or i don't understand something?

Double slash in the beggining is for me only when we have path like %base_path%%plugin_dir% then of course it could be problem somewhere, but there is only %plugin_dir%...
If u can pls update to last DEV to check that and in ckeditor.lib.inc around line 554 it's var $plugins(in function ckeditor_plugins_render) check this variable before flags replacing... if it possible pls paste here what u get there and paths which u get after render...

Probably i don't see sth really easy or i do sth wrong...
Maybe someone with this bug can give me access to webserver to fix it asap - if yes pls PM me access data to your webserver...

Again really thx for help, i really appreciate this.

vinmassaro’s picture

Ran into this error as well with the editor not loading. Saving my 'Advanced' CKEditor profile makes this error go away immediately.

Marshall_Kennard’s picture

Here is some debugging results from ckeditor.lib.inc

After $render is populated on line 543...

 Note the square brackets have been removed from the array keys for formatting...
print_r($render): Array
(
    %base_path% => /
    %editor_path% => /sites/all/modules/ckeditor/ckeditor/
    %module_path% => /sites/all/modules/ckeditor
    %plugin_dir% => /sites/all/modules/ckeditor/plugins/
    %plugin_dir_extra% => /sites/all/modules/ckeditor/plugins/
) 

Then each plugin is processed...

foreach ((array) $plugins as $i => $plugin) {
  	print "PLUGIN PATH: " . $plugin['path'] . "\n";

PLUGIN PATH: %base_path%%plugin_dir%drupalbreaks/
PLUGIN PATH: %base_path%%editor_path%plugins/tableresize/

My global config settings are shown on #14,
I am not sure why %base_path% is added, as it already appears to be included in %plugin_dir% and %editor_path%.

Of course, setting a profile that does not use one of these plugins will work just fine.

Marshall_Kennard’s picture

I just loaded the latest dev version: version = "7.x-1.11+4-dev" and found no change.

Here are the two plugin paths before translation:

DEV PLUGINS PATH: %base_path%%plugin_dir%drupalbreaks/
DEV PLUGINS PATH: %base_path%%editor_path%plugins/tableresize/

The $render array is the same as above.
Where is the %base_path% token coming from?

Marshall_Kennard’s picture

Recompiling the profiles (with no changes) fixed the problem. The %base_path% token is gone. Apparently, this mush have been left over from the previous version.

Here is how the plugin paths look now:

DEV PLUGINS PATH: %plugin_dir%drupalbreaks/
DEV PLUGINS PATH: %editor_path%plugins/tableresize/

I just confirmed that the %base_path% tokens were present in the loadPlugins array in original ckeditor_settings table prior to the upgrade from 7.x-1.9 to 7.x-1.11.

moreorless’s picture

Can confirm that resaving the CKEditor module Profiles (with no changes) as described by Marshall in #26 returns the editor following upgrade from 7.1.9 to 7.1.11. Thanks very much.

dczepierga’s picture

Title: uncaught exception: [CKEDITOR.resourceManager.load] Resource name "drupalbreaks,drupalbreaks" was not found at "//sites/all/modu » [D7] Wrong path to plugins stored in database
Status: Postponed (maintainer needs more info) » Needs review

Again really thx for help.
I write update for CKEditor module to fix paths in the database during update.php... following paths are replaced:

      "%base_path%%editor_path%" => "%editor_path%",
      "%base_path%%module_path%" => "%module_path%",
      "%base_path%%plugin_dir%" => "%plugin_dir%",
      "%base_path%%plugin_dir_extra%" => "%plugin_dir_extra%"

All changes are commited to GIT (diff).

After update to last DEV, pls run update.php to fix paths in database.

Pls review this fix and write does it help or not.
Really thx for all your work to help fix this bug.

Greetings

vinmassaro’s picture

The updated dev release appears to fix this problem. One thing to note is that plugins like TableResize are not a part of CKEditor 4, so you will get JS errors until you add the plugin back in. It can be downloaded from http://ckeditor.com/addon/tableresize.

vinmassaro’s picture

As a followup, any CKEditor plugins that do not exist try to load and prevent the editor from loading. In my case, I was missing the Tableresize plugin, and the syntaxhighlighter plugin. After adding the Tableresize plugin, that error went away. The problem I have now is that the syntaxhighlighter plugin is not for CKEditor 4, and it is enabled on 20+ sites of mine. I can't upgrade to CKEditor 4 cleanly without somehow first disabling this plugin programmatically. Can you account for this in the schema update - disable any plugins that were enabled but are no longer found - or provide code I can add to programmatically disable plugins inside the update hook? Thanks!

rroche’s picture

Fix #16 worked for me, we just updated to latest and edited those lines it worked great

dczepierga’s picture

@vinmassaro, i'm really happy does it work... but what to do when someone first update CKEditor module with old CKEditor library, and after that update CKEditor library to v4?
After this he would have this same situation like u have with plugins...

dczepierga’s picture

@vinmassaro, i've add check of available plugins in profiles: #1870270: [D7] Disable plugins which not exists and are stored in ckeditor profiles.
It is checked when you enter CKEditor configuration page.

CatDrup’s picture

Thank you also ! This worked for me as well. Just resaving the module Profiles.

vinmassaro’s picture

@dczpierga - can you clarify how we should be building the CKEditor library?

When I use the standard package, it seems I have to add plugins into the module plugin directory, sites/all/modules/contrib/ckeditor/plugins.

If I use CKBuilder and choose the plugins I want, these get bundled and seem to load automatically without needing to configure them in the CKEditor profile (other than button placement). Thanks.

dczepierga’s picture

@vinmassaro, it's hard to say how build CKEditor library or which package use, because it depends what u need exactly.

If u want to have full functionality of CKEditor v3 u can do this in 2 ways:
1) U can download Full package and add following plugins from addons repo:
- Autogrow
- Table Resize
- Styles parser
- SCAYT or WebSpellChecker
All this downloaded plugins u can add to "sites/all/modules/ckeditor/plugins" and then it should be available in CKEditor profile in Plugins - u can enable there all and they should work.

2) U can use builder, where u choose Full preset and add: autogrow, table resize, styles parser plugins and after this u build package and upload to your Drupal. If u want to use SCAYT or WebSpellChecker download it from addons and upload it to "sites/all/modules/ckeditor/plugins". After this all this plugins u should see in CKEditor profile where u can manage it.

All preset package has Moono theme by default, but if u use CKBuilder u can choose old Kama skin. Moono i think is better because it's load much faster and u can use any color of interface (u can configure it in CKEditor profile).
U can also download Kama skin from addon repository, then u can add it to "skin" directory in CKEditor library dir.

Link to the standard package which u give here it is Basic package, where u have only basic editing option - so if u need sth more try to download Full package and then u will see what u have there and what'd u need.

If u have more questions pls write, i will try to answer asap.

Greetings

f1mishutka’s picture

After upgrading CKEditor module I had the issue with "Uncaught [CKEDITOR.resourceManager.load] Resource name "drupalbreaks,drupalbreaks" was not found at "//sites/all/modules/ckeditor/plugins/drupalbreaks/plugin.js?t=C3HA5RM" message.

Solved it by disabling and then re-enabling "Drupal teaser" plugin in every CKEditor profile.

dczepierga’s picture

@f1mishutka, it was fixed here (comment #28) and should work without problem in last DEV version - u must run update.php to fix this problem.

Greetings

dczepierga’s picture

Status: Needs review » Fixed
mkesicki’s picture

Status: Fixed » Closed (fixed)
rowanprice’s picture

Thanks Ian -- #21 worked great for us :)

iloveyoutxtvbs’s picture

Similar problem. Upgraded to a new build and immediately discovered that CKEditor was no longer loading on page load.

#21 worked like a charm.

Thank you!

Mina.Habashy’s picture

PERFECT :))))
SOLVED
Thanks Ian -- #21

kjala’s picture

As mentioned by many users the problem is with the %base_path% token. I went to /admin/config/content/ckeditor and resaved all the CKEditor profiles. That helped resolve the problem

stewart.adam’s picture

Same issue here, suggestion in #44 solved it. I think either %base_path% needs to be portable or official documentation should be updated to reflect the procedure for refreshing %base_path% (i.e. resaving profiles).

joshtaylor’s picture

#44 solved it for me, for:
stat failed for /sites/all/modules/ckeditor/ckeditor.config.js

edit: It's back, what the.

attheshow’s picture

Issue summary: View changes

#44 worked for me.

harshadananjaya’s picture

#21 is working for me ....
thanks....

cthshabel’s picture

Whew! #44 solved it for me. Simple fix. Thanks everyone for confirming this worked.

marcoka’s picture

thank you, also had this problem. #44 worked

AlexHolsgrove’s picture

I ran into this same issue - remember to check to see if there are any database updates to run as this resolved the broken paths ifor me.