The strangest thing is happening. When you type text in a CKEditor text box, and then click on the Save button, the changes are completely lost. Also, when you click on the Preview button, whatever you typed before does not show in the preview pane.

Now here is something even more weird. When you click on the Preview button a second time, the changes mysteriously appear again. So, the way to solve it after you made changes is to click on the Preview button twice, and then on the Save button. I don't think this is something our users will be happy to live with.

Internet Explorer works fine, with no glitches. Cannot figure out what's going on.

By the way I'm using Firefox 3.6 and Internet Explorer 6.

We really need a fix for this urgently!

CommentFileSizeAuthor
#23 ckeditor-741572.patch777 bytesmephir

Comments

jaysadie’s picture

Is anyone else experiencing the same problem? I have just noticed that if I switch to Plain text editor that the problem goes away. It works every time. If you type text in the Rich text editor and then switch to Plain text editor, and back to Rich text editor, the problem also goes away.

So to summarize, if you create new content, using Firefox as your browser, and type any text in the text area, the text does not show up when you click on Preview, or Save. It simply disappears into thin air. If you click Preview twice, the problem goes away.

Please, we need a fix for this. I cannot let my site go live until this has been resolved.

jaysadie’s picture

FYI - I thought that it may have something to do with HTML Purifier's caching mechanism, so I disabled it. In fact, I disabled all filters, to make sure nothing else was interfering with CKEditor. After doing so, the problem still showed up.

Thought this might help in trying to isolate the problem. Also, when you make a change to the text, you have to hit the Preview button twice to see the change. (the first preview shows the original text, prior to the changes)

Another note: I do not have page caching enabled. So, it's not a caching issue. Hope this all helps.

staropram’s picture

This should be promoted to mega-urgent as it makes ckeditor worse than useless. It makes it damaging.

I just lost 1 hour's worth of editing. I clicked preview on the post, and boom, it's gone.

Changing input types also seems to mess things up.

You really need to sort this immediately, as distributing this software broken like this, is worse than distributing no software at all.

jcisio’s picture

Priority: Critical » Normal

It is not critical if it happens only to two users. You should provide more information, or an URL to investigate further. Try to use Firebug or Error console to see if there is any problem.

jaysadie’s picture

I have tried to use Firebug to debug it, but nothing shows up. It is very simple to replicate. Open any node with Firefox and try to add text to it. Then click on the Preview button. You'll immediately see what I mean. It is not some convoluted feature that I'm trying to implement. It's just a plain old text field that I'm trying to type text into. I'm not even trying to embed objects or images. A simple "Hello world" will demonstrate what I mean. Now, if you test this with Internet Explorer, even version 6, you will not replicate the problem, because it works just fine. You have to use Firefox 3.6. The thing is that this has been working fine about two weeks ago. Not sure what changed since then, but something is causing this. As I mention in a previous post, I turned off all filtering, trying to isolate the problem to CKEditor only. What's also strange is that if you switch to plain text editor the problem goes away.

Please let us know if you were able to replicate the problem at your end with Firefox. If you do not experience the same problem, then we'll at least know there must be something else at work here.

If you like, I'll create a test account for you on my site where you can see the error first hand. Maybe you will see something that I'm overlooking.

Thanks, jcisio.

mephir’s picture

@jaysadie: are you using some firefox extensions ? I have Firebug 1.5X.3, Fireshot, Download Tab, Greasemonkey, something for mouse gestures, web developer, adblock with my FF 3.6 Installation and in fact everything works fine for me. Maybe the point is there for an example you have got some 3rd part scripts to greasemonkey.

zygmurti’s picture

I am using Firefox 3.5 and experience the same problem that you guys outlined above. I don't know how to resolve it. I installed ckeditor and was really happy a module like that existed as it makes posting so much easier but with this bug/issue. Hope someone can come up with a solution. Will try installing Firefox 3.6 and see whether that helps.

jaysadie’s picture

I have created a test account on my site, where this issue can be easily replicated. It now seems, from the previous post, that it is not only a Firefox 3.6 issue, but also a 3.5 issue.

Here is a link to our site, with the login information required:

http://zoomvote.com/

UserName: test3
Password: test3

Please login and click on the "Create content" link. Type in a test question, and at least 2 vote options, e.g. "Test question", "Yes" for the first option, and "No" for the second option. Then type in something like "Hello world" in the text field (called Soapbox). No other input is required. Scroll down and enter a Captcha. Then click on the "Preview" button.

On the preview screen you will notice the question and the 2 options, but the "Hello world" text is not there.

Now click on the "Preview" button again. This time the "Hello world" shows up.

If you click directly on the "Save" button, without previewing, the "Hello world" text will be lost into cyberspace. Can you imagine a user spending hours to type or construct a nice post, and then clicking on the "Save" button? Imagine that user's frustration when he/she finds out that everything they had typed was lost!

This is a VERY SERIOUS issue. It's not a little glitch. It basically completely renders one's site useless.

We really need a fix for this, URGENTLY!!!

Thanks in advance for spending precious time on this, and for finding a solution.

P.S. Remember to test this with Firefox 3.6 or 3.5. If you use Internet Explorer you will not be able to replicate the problem. Even IE 6 works!

wwalc’s picture

Title: When using Firefox text is not saved when clicking on Save button - URGENT » CKEditor is incompatible with the Ajax module (?). When using Firefox text is not saved when clicking on Save button - URGENT

It looks like the problem is in the Ajax module that is used in your web site (btw. I hope you're aware that the login/pass is available to anyone :)).
I didn't confirm it locally yet, but I guess that's the source of a problem, it looks like we need to check compatibility with the Ajax module and fix the problem.

jcisio’s picture

I can confirm that. It seems the Preview button calls editor.updateElement() but the Save button does not.

staropram’s picture

> It is not critical if it happens only to two users.

As you well know, two bug submissions does not imply that only two users are affected. And neither does it imply that 10,000 are.

The number is simply unknown without an extensive poll.

But given the freshness of the bug, and the severity of the problem, surely it would be prudent to air on the side of caution?

I guess it comes down to how much you care about users losing confidence in the module, and what pride you have in maintaining it.

I've simply stopped using it. Cheers.

wwalc’s picture

@jcisio - thanks for confirming it so quickly.

@staropram - I understand that you were really dissapointed, I also don't like when the text that I've typed for a long time is gone (it happend to me as well on some non-Drupal site a couple of times). I'd appreciate if you could help us in fixing it.

@anyone:
I have just committed a code that should solve this issue. Could you please check the dev release tomorrow or download the latest version of ckeditor.utils.js here:
http://drupalcode.org/viewvc/drupal/contributions/modules/ckeditor/inclu...
and let me know if it's working better with the Ajax module now?

jaysadie’s picture

Thanks for the quick response, wwalc.

Yes, I'm aware anyone can use the username and password I posted here. I'll be changing the password as soon as we have resolved the issue. I'm watching it carefully, so I'm sure nobody will misuse the temporary access I have given to anyone interested in trying to work on this problem.

I'm very keen to test the changes you have made, and will be very pleased as soon as we are in the clear. Our website will then be 100% complete, and ready to become the next big name on the Internet.

I'll be holding my thumbs.

Thanks again.

jaysadie’s picture

Looks like you've cracked it, wwalc. Nice job. Also tested it in IE6. Still works there too!

You are a star. I will run some more tests tomorrow, just to make sure everything is fine. I've learned a long time ago that one can sometimes fix one problem, only to be surprised by another popping up. But, I'll remain positive, and hope for the best.

Thanks. You made my day!

jaysadie’s picture

I've been testing the changes as promised.

There is just a small problem when clicking on the Save button.

I get the folllowing message:

ajax.module: An unknown error has occurred.

However, all the fields are save correctly. Also, if I then click on the Save button again (that displays "Loading..."), I get the following Drupal message:

This content has been modified by another user, changes cannot be saved.

P.S. None of this happens in Internet Explorer!

jaysadie’s picture

Not sure if this is a related issue, but I've just noticed that when I edit nodes that have blank text fields, the system now automatically inserts a "< br />";

What's also weird is that it does not always do so. There seems to be no logic to behind when it does it, and when not. Sometimes it works fine, and then it just seems to have a mind of it's own and inserts the < br />.

If this is not related to CKEditor, I'll open a new issue under whatever module is causing it.

pauljb’s picture

Subscribe

I'm having this issue with Safari and FireFox.

kinosura’s picture

I've tested the script on my site, it didn't help.

My problem is that ajax form submit do not save changes to ckeditor textareas. Besides after click a submit button the node duplicates.

jaysadie’s picture

Is there an easy way to get rid of the < br /> text fields? As I mentioned before, if you do not enter any text in the text field the system automatically adds < br /> to it. Can we not check for < br /> just before the text field is updated in the database and change it to an empty string ('') if that's the only content in the field?

I'm also finding it hard to center tables in CKEditor text fields. No matter what I do, the tables stay Left justified. I've tried using "div" and "span", but it doesn't work. Any ideas?

Thanks.

Enzman’s picture

Priority: Normal » Critical

Hi there wwalc. I believe that you may have a solution that I am willing to try.

I have the Ajax module and the same issue mentioned above, though the issue is found to be present on Chrome, Safari, Firefox and IE.

I have confirmed that compatibility with AJAX is the issue by disabling the AJAX module and testing. CKEditor works when AJAX is disabled. (The trouble is that many of my sites have AJAX and CKEditor).

The following is a list of the steps I took, my best guess as to what to do.
Step 1) Went to the link http://drupalcode.org/viewvc/drupal/contributions/modules/ckeditor/inclu...
Step 2) Downloaded ckeditor.utils.js to your hard drive
Step 3) Found ckeditor.utils.js on your Drupal site ...sites/all/modules/ckeditor/includes/
Step 4) Renamed to "ckeditor.utils.js (old)",
Step 5) Uploaded new ckeditor.utils.js to the same location in step 3.
Step 6) Test to see if it works (it doesn't)
Step 7) Flushed all caches
Step 8) Test to see if it works (it doesn't)

Am in an almost identical situation to jaysadie. I may end up reverting to the last CKEditor which worked fine.

The new ckeditor.utils.js is significantly shorter than the old one; the old one has three references to AJAX, the new one none.

Have upgraded the priority to critical, as the module does not work as intended. (It should remain critical until this bug is fixed and the module files are upgraded accordingly.)

I will try the beta version of CKEditor next, then revert back to an old version.

Note that I discovered the issue with my client - very embarrassing. From now on will be a lot more cautious when implementing module upgrades, will definitely be testing them on house sites before uploading to commercial sites.

mephir’s picture

@jaysadie: #16 this bug appear also without ckeditor this is internal Ajax module bug, here(#407418: "This content has been modified by another user") is their issue about it. I'm undestand that it is annoying, so i cann't help you with it, possibly you can disable "Disable redirect" option in Ajax settings, it protect against twice submit form with ajax, but in my opinion it isn't right way to solve it, because Ajax module is unnecessary as well.

mephir’s picture

StatusFileSize
new777 bytes

Here is patch which fix error appear when creating new content.

Enzman’s picture

Mephir - how do I use the patch?

mephir’s picture

@gantt: you should add lines with "+" into ckeditor.utils.js. You should find the place simply. Code without "+" are existing code. Also in patch is number of lines where it starts. You can do it manually or if you are using linux, there is patch command.

mephir’s picture

Status: Active » Needs review
kvvnn’s picture

#13 file is working for me :D

Enzman’s picture

Thank you mepher for your suggestions.

I have since removed all Ajax from my sites - they now work fine.

cabplan’s picture

How do you disable the ajax on the CKeditor, I have tried downloading the .js file and replaced it with the patch code but still nothing is working.

Enzman’s picture

cabplan, what I did was removed all Ajax modules from my sites.

That may sound radical but I discovered that I could do everything that I did with Ajax using alternate modules.

cabplan’s picture

The issue I am having is that Firefox, Safari and Chrome do not save any of my edits to my nodes. Only IE works. I have tried numerous things to get this working and nothing seems to work. Does anyone know why this is happening, It is coming to the point where I am very frustrating that I might switch to another open source. Please let me know how to fix this problem

Enzman’s picture

I had the same issue. So I got rid of the Ajax modules. Now all my sites work fine. See post #21 above.

cabplan’s picture

Still nothing, I have removed my AJAX modules, well first off I installed them because I did not even have then and nothing seemed to change, I then removed the AJAX modules and still nothing. Firefox, Safari, and Chrome do not save changes when I make edits to webpages. IE works fine.

Steps I just took to try resolving this was everyting in #21, I even completely disabled CKEditor, completely removed it from server, downloaded the CKEditor from drupal, hoping the creator would have posted a better version, but again getting the same result. I am having a really difficult time getting this to work, and it used to work, and all of a sudden stopped. Does anyone know of any other solutions I can try.

kvvnn’s picture

cabplan : the node-edit submits are being performed WITHOUT ajax, and the content is not being saved at this time except by IE?

cabplan’s picture

Yes, I never originally had a module called Ajax, I then noticed users talking about turning it off so I went out to drupal and downloaded the Ajax module, installed it and it did not help so I completely removed it from my server and still only IE lets me save my changes to my webpages when using the Editor. Firefox, Safari and Chrome do not save any changes when I use the CKEditor. Also I noticed users indicated that there modules folder are in their /sites folder but my modules folder is in my root folder, does that matter. Everything seems to register when I put in a new module so I thought it was always in the correct place. Please let me know

kvvnn’s picture

cabplan: you need to open a mew support request, as your issue is not related to ajax.

I can't help much further than that at this point. I recommend uninstalling / reinstalling in sites/all/modules/ckeditor for starters.

cabplan’s picture

Ok I have no idea what happened but its working now in all browsers. The only thing I did was remove it and re-install it. Same files. The only thing I did different was in the ckeditor/ckeditor folder I did not copy any files into that folder like it instructs you to do. But it works. I also got it to work with the WYSIWYG API but you cannot browser the server with that. All is well again. thanks for hellping

mephir’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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

guntherdevisch’s picture

Status: Closed (fixed) » Active

Hi all,

I'm having the same problem, i can't save my content when clicking the Save button. I have the Ajax module & CKeditor installed, but it's strange that it only occurs when i save Filtered html. When i select Full html, the new data is saved.

I tried to implement the patch, but i don't find a folder 'includes' in my CKeditor module. Also the file 'ckeditor.utils.js' is no where to find.

Can someone help?

Thanks,
Guntner

jcisio’s picture

Status: Active » Closed (fixed)

I think you have problem with your install. The includes folder is right in the ckeditor module folder, and ckeditor.utils.js is in that folder. However, you don't have to apply the patch which is already included in the latest dev release.

BTW your symptomp is different from what was said in this topic, and was fixed. You should open new issue.

guntherdevisch’s picture

Hi jcisio,

Thanks for your quick reply.

I reinstalled the CKeditor module and now i see the 'includes' folder. Though the problem is still there. So i have disabled the Ajax setting for the specific content type that i use. Now i can save content again with the Filtered html format. I'll post a new issue when it's necessary.

Thanks & Greets,
Gunther

topdawg’s picture

This may or may not be relevant but in my case disabling the wysywyg ajax duo solved the issue for me. There is the Ajax portion and the wysiwyg portion in user interface section. The rest of the Ajax stuff seems OK for me.

jrstmartin’s picture

Status: Closed (fixed) » Active

I'm using ckeditor-6.x-1.3 and ajax-6.x-1.x-dev, 2011-Apr-08. Browser type doesn't matter. The code mentioned in #13 above, in ckeditor/includes/ckeditor.utils.js

/**
* Ajax support #741572: CKEditor is incompatible with the Ajax module (?). When using Firefox text is not saved when clicking on Save button - URGENT
*/
if (typeof(Drupal.Ajax) != 'undefined' && typeof(Drupal.Ajax.plugins) != 'undefined') {
  Drupal.Ajax.plugins.CKEditor = function(hook, args) {
    if (hook === 'submit' && typeof(CKEDITOR.instances) != 'undefined') {
      for (var i in CKEDITOR.instances)
        CKEDITOR.instances[i].updateElement();
    }
    return true;
  };
}

does not solve my problem.

I have Ajax module enabled for node/edit forms. CKEditor is enabled by default on the body field. I can create a new node body via CKEditor, save it, and everything gets saved. However, if I edit that node again, change something in the body via CKEditor, save it, my changes are not saved.

I have fixed the problem by patching Ajax module's FCKeditor plugin.

mkesicki’s picture

Status: Active » Postponed (maintainer needs more info)

Anyone has this problem in latest DEV version or latest stable version (6.x-1.8) ?
@jrstmartin please don't reopen closed tickets. Create new one if you have similar problems like in closed ticket.

nancydru’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Closed (outdated)