Although the latest version of the module supports ckeditor 4.0, upgrading an existing installation that is using 3.6.x is painful. Settings need to be saved again as well as user account settings, since the default skin changed and the editor doesn't show up otherwise.

Comments

ksymer’s picture

Thank you for posting the painful process. I just spent quite a long time trying to fix a disappearing CKEditor because I installed the latest version (4.0). After reading your issue, I downloaded 3.6.5 and everything returned to normal. Suggest editing the COPY_HERE.txt to mention this issue. It currently states:

Go to http://ckeditor.com and download the latest version. Then
uncompress the contents of the "ckeditor" directory of the downloaded file to
this folder (modules/ckeditor/ckeditor).

Macronomicus’s picture

" Settings need to be saved again as well as user account settings" doesn't seem to work... there is somewhere a setting sticking for the kama theme, I cant seem to find it, even disabled/uninstalled ckeditor :( I'll post back because it all works with kama theme, just not moono yet.

Macronomicus’s picture

Searching in the db I found even after uninstalling fully, there were still references to ckeditor & kama in the user table... trouble is seems the setting is in the blob and not clean to remove by hand.

What I did to "fix" it for now was to simply swap the names of the skins... just renamed moomo to kama, seemed to work fine and now I have the moono theme. I agree with the OP, some quick check and clean out of old settings would be helpful, or at least a fully uninstall that cleans it all out.

Thanks for making this work with the new ckeditor, its much faster/cleaner etc. Cheers! :)

Macronomicus’s picture

ha! never mind all that.... the skins are not totally consistent in naming... so renaming its a no go, it works but a lot of the images have different names and messes some of the buttons up. lol kama it is for now at least.

bkat’s picture

I can't seem to get the "Font" and "Size" controls to show up in the full editor. They render correctly on the demo page at http://ckeditor.com/demo#toolbar

Macronomicus’s picture

Super simple fix... clean out kama from the user blob
SQL

update users set data=replace(data, 'kama', 'moomo') where data like '%kama%';

The skin selector in the admin doesn't seem to override whatever settings are there from the older version, nor does disabling & uninstalling the module. I tried re-saving a user node which also didn't clear the old stuff. After cleaning the db though all is well :) 4.0 is sweet!

Macronomicus’s picture

@bkat
Are you sure you downloaded the Full ckeditor package and included all the additional plugins/skins?

bkat’s picture

That did it. Is there a list of which plugins/skins are needed?

dczepierga’s picture

Title: Create an upgrade path from 3.6.5 to 4.0 » [D7] Set default theme if selected not exists
Status: Active » Needs review

@bkat, u probably need Full package of CKEditor (download). After install it everything should work

I make a little fix for bug with skin - i commit changes to GIT (diff).
Pls download last DEV and check does it help or not.

Now after fix, the script check does the skin saved in profile exists - if not it search and set default skin... if default skin not exists (moono or kama) it choose first skin from the list.

Greetings

jjsmyth1984’s picture

Subscribed to thread/

I am having the same problem with my testing this new update on my test site before implementing the update on our live site.

I have been playing about on test and confirm this working "#6 Posted by macrocosm" - Thanks macrocosm.

Joe

dczepierga’s picture

@jjsmyth1984, could u try last DEV version? i fix it there and now it shouldn't be problem with it...

Greetings

caktux’s picture

Status: Needs review » Needs work

It seems to work for user settings, but we still have to resave every profiles' settings. Does the fix end up running every time ckeditor gets loaded? We really need an upgrade path, not just for the theme, hence the original title.

Macronomicus’s picture

hmm well im getting all these unserialize errors now from the ckeditor bits in the user blob...
Here is a couple
Notice: unserialize(): Error at offset 280 of 471 bytes in _drupal_session_read() (line 109 of /var/aegir/platforms/drupal-7/includes/session.inc).
Notice: unserialize(): Error at offset 280 of 471 bytes in UserController->attachLoad() (line 307 of /var/aegir/platforms/drupal-7/modules/user/user.module).

Here is the user blob thats throwing the error above... offset of 280 is right where I changed it to moomo, How can I clean out all that ckeditor stuff from the user blob? I think this is left over stuff from when the site was D6

a:10:{s:13:"form_build_id";s:37:"form-0e2214b5a4373c5d0ddf5c805184b6f";s:7:"contact";i:1;s:16:"ckeditor_default";s:1:"t";s:20:"ckeditor_show_toggle";s:1:"t";s:14:"ckeditor_popup";s:1:"f";s:13:"ckeditor_skin";s:4:"moomo";s:15:"ckeditor_expand";s:1:"t";s:14:"ckeditor_width";s:4:"100%";s:13:"ckeditor_lang";s:2:"en";s:18:"ckeditor_auto_lang";s:1:"t";}
bkat’s picture

You'll need to change s:4:"moomo" to s:5:"moomo"

update users set data=replace(data, 's:4:"moomo"', 's:5:"moomo"') where data like '%moomo%';

dczepierga’s picture

@bkat, the skin name is moono...
So u must change to s:5:"moono"

@caktux, do u see any javascript errors before profile resave? i must know where is the problem to fix it... for now i cannot reproduce this so it hard to fix sth...
As i understand good u resave CKEditor profiles not CKEditor Global Profile?

Macronomicus’s picture

Thanks bkat :) that was it for those unserialzie errors, cheers!

A few more thoughts
The skin selector on the edit of ckeditor profiles is overridden when the theme is set in the user data blob. To override that I had to add config.skin = 'moono-dark'; to the Advanced Options - Custom JavaScript configuration. Or do a database search/replace with moono-dark

So I'm wondering is there supposed to be a form on the user edit screen for customizing the editor? I dont see one, I tried dis/re-enabling the permission to customize, but couldn't find where the user is to tweak that.

This new ckeditor is too sweet! The moono-dark is perfect on my dark site.

dczepierga’s picture

@macrocosm, user can change this in "user profile" editing -> "Rich text editor settings" section.

I never thought about overwriting skin saved in user profile...
Someone have any idea how to do this/fix it?

Greetings

dczepierga’s picture

Status: Needs work » Fixed
mkesicki’s picture

Status: Fixed » Closed (fixed)