Hi there,

I'm in the process of upgrading from D6 to D7. I use a couple of own modules for the site, however I found a problem with CKEDITOR.

To make sure it's not a problem with "my" modules I created a ne content type which consists of just a body field (long text with summary) and an image upload field. All works as expected an CKEDITOR shows up on body field.

When I enter some text and then try to upload an image (which works) CKEDITOR loses all inserted text. This is due the fact that CKEDITOR dissapears during image upload and comes back as soon as image is uploaded but with no text. If the node already has some text, then on reedit all text stays, but any changes get lost.

I have no idea why CKEDITOR dissapears on image and file upload but that causes text loss.

Anyone can verify that, so it's not a problem with my site update. (even so I did a fresh install which even did work).

I tried 7.x-1.1 and 7.x-dev with D7 and D7 git version and CKEDITOR from "drush ckeditor-download"

Thanks,
bzrudi

Comments

bzrudi’s picture

Hi,

sorry typo, above it should read (even so I did a fresh install which even did *not* work).

cheers
bzrudi

dhatman’s picture

Version: 7.x-1.x-dev » 7.x-1.1

I have the same problem. You get the same bug when switching between plain text editor and rich text editor.

If you modify the body in rich text editor, and then switch to plain text editor, all changes are lost.

However, if you make changes in the plain text editor, and switch to rich text editor, the changes remain.

The problem is most definitly related as the rich text editor is temorarily disabled when using Image upload, at least when using Insert module.

dczepierga’s picture

I try this issue with last DEV version of CKEditor module, and I cannot reprouce this... Pls update to DEV version and report that the problem is exists.

bzrudi’s picture

Hi dczepierga,

thanks for getting back! I tried latest DEV from March 29, here are the results:

Switching from FULL/FILTERED HTML to plain text and back works for me in both directions, no problem with that...

The upload problem still exists for me, here is what I tried.

1. In FULL or FILTERED HTML mode add a line of text -> and upload an image
Result: CKeditor dissapears and the plain text area shows no entry, e.g. the text is completely missing

2. Add a line in plain text mode and switch back to FULL or FILTERED HTML mode the line shows up in CKeditor
- now add a second line in FULL or FILTERED HTML mode
- now upload an image and the plain text area during upload just shows line 1 in

tags line 2 is missing
- now when Ckeditor re-appears the result for clear is, that also line 2 is missing

As I'm PHP Developer I have no idea what needs to be done from JS side, but it seems to me that the CKeditor Body field is not saved before the editor temorary get's disabled during upload. Is there a way for me to debug that JS stuff to see where the problem exists. At least the JS error console doesn't show any error message...

Thanks and cheers
bzrudi

jodythai’s picture

I'm facing this problem too. It's really annoying if you already had your nodes and just edit them to upload some images. The workaround at this moment is change the Body's filter to PHP Code (or anything else), then upload the image, then change Body's filter back to Full HTML if you need to edit something after the uploading.

mkesicki’s picture

Priority: Normal » Major

I can confirm this bug. When try to upload or after upload remove file text in CKEditor is missing. The text remain untouched when in case when I :
- write some text
- change from filtered HTML -> Full Html or vice versa input format
- upload/remove image/file

I don't see any js errors. This can be related with page refresh/ajax when uploading/removing file.

tangamampilia’s picture

I also confirm this bug. Suscribing.

xmichaelyx’s picture

The problem also occurs when entering Book content.

1) enter title
2) enter body text
3) choose Book Outline
4) choose which book is being written to (causes page refresh)
5) all Body content is deleted.

Definitely a page refresh problem.

merro’s picture

confirm+1 subscribing

dczepierga’s picture

Status: Active » Needs review

I make a little fix and commit to GIT. Now it should work fine...

Please check the latest dev release and let me know if you notice any poblems with it. Remember to clear Drupal cache and browsers cache before testing.

Greetings

tangamampilia’s picture

This post have a partial fix... also works when you have a image field. I already tested it.

http://drupal.org/node/1093028

dczepierga’s picture

Try to use last DEV version, this should help in your problem too... After check pls report does it help or not...

Greetings

mkesicki’s picture

Thx @dczepierga , it works for me now (latest dev).

dczepierga’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

kolafson’s picture

This issue still exists for me using the latest dev release of CKEditor. While the problem of the text disappearing when switching between text formats seems to be solved, the initial issue of the text disappearing when files are uploaded still exists.

Edit: If you have entered text in one text format, then switch to another, THEN upload a file, the text stays in the WYSIWYG.

If you enter text in one text format, don't change it, and upload a file, the text in the WYSIWYG disappears.

sachbearbeiter’s picture

subscribe

jczuo’s picture

confirm and subscribe

sachbearbeiter’s picture

Priority: Major » Critical
Status: Closed (fixed) » Active

#16

mkesicki’s picture

Hi,
I tested this as described in #16 and I can't reproduce this. I use latest version 7.x-1.2. Can you test this with latest version or with DEV version ?

dczepierga’s picture

Status: Active » Postponed (maintainer needs more info)

I also cannot reproduce this... pls try to test it with last DEV version of CKEditor module and CKEditor library in version 3.6.
If u reproduce this, write intruction step by step what u re doing - when i cannot reproduce bug i also cannot fix it...
So give as much details as u can...

Greetings

mkesicki’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)