Updated FCKEditor and now any text that was entered before is now gone. First noticed in the site maintenance page, where the offline message was now blank.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

steveray’s picture

I've noticed that the original text shows briefly in the default text box editor while FCKEditor is loading but once FCKEditor has loaded, it shows an empty field.

If I exclude the edit-site-offline-message field, and return to the site maintenance page, then the original text is still there (I have not saved a blank FCKEditor page, so I don't know if it would overwrite the old text.)

wwalc’s picture

Could you open Firefox + Firebug and check all ajax requests?
I suppose that FCKeditor is trying to open fckeditor/xss but HTTP 404 code is returned instead(?) - in such case clearing menu cache should do the trick.
Let me know what do you have there.

wwalc’s picture

Also please paste here what FCKeditor sent in the POST request, e.g.

Post
filters[] filter/0/1
text

body

And what was the result of the ajax call.

steveray’s picture

Version: 6.x-2.x-dev » 6.x-1.3-rc5
Priority: Critical » Normal
Status: Closed (fixed) » Active

I'm not sure what the AJAX call is. Here are results from Firebug:

Response Headers
Date Thu, 20 Nov 2008 08:31:59 GMT
Server Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.7a mod_bwlimited/1.4
X-Powered-By PHP/5.2.6
Expires Sun, 19 Nov 1978 05:00:00 GMT
Cache-Control store, no-cache, must-revalidate, post-check=0, pre-check=0
Last-Modified Thu, 20 Nov 2008 08:31:59 GMT
Content-Length 0
Keep-Alive timeout=15, max=95
Connection Keep-Alive
Content-Type text/html; charset=utf-8
Request Headers
Host estado29.net
User-Agent Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4
Accept */*
Accept-Language en-us,en;q=0.5
Accept-Encoding gzip,deflate
Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive 300
Connection keep-alive
Content-Type application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With XMLHttpRequest
Referer http://mysite.com/admin/settings/site-maintenance
Content-Length 152
Cookie SESSce0df7cb2967f93c7cc57fc6b100d970=aa9fdfa9768be1c2fbd10fedc89a2b48; has_js=1; __utma=75210630.3766177219332257000.1227168175.1227168175.1227168175.1; __utmb=75210630.4.10.1227168175; __utmc=75210630; __utmz=75210630.1227168175.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utmv=75210630.1%3AAdmin%3Aauthenticated%20user%3A%3A
Pragma no-cache
Cache-Control no-cache
------------------------------------------------------------------------
filters[] undefined
text Estado+29+is+currently+under+maintenance.+
+We+should+be+back+shortly.+
+Thank+you+for+your+patience.
------------------------------------------------------------------------
When I click Response I get no response. If I do the extensions.firebug.allowdoublepost I get no response.

Not sure if this is what your looking for, this is over my head.
Thanks
Steve

wwalc’s picture

Is it possible that you have changed the default security settings in the FCKeditor profile? Did you uncheck the "HTML filter" and checked some other filters instead?
Please let me know what are your "security" settings in the FCKeditor profile (go to admin/settings/fckeditor, edit your FCKeditor profile, scroll down to a "Security" section) - let me know which filters are checked and which are unchecked.

You can try a temporary fix for this issue: write down somewhere which filters are enabled and uncheck all filters.
This is definitely a bad solution, but at least you'll be able to edit your nodes again (at least I hope so).

Alternatively, enabling the "HTML filter" may help as well (if it has been disabled).

I saw that in the text, that you have pasted, there is "filters[] undefined". Please open any page where you can edit text with FCKeditor and take a look at the source of this page. Check whether there are Drupal.settings somewhere in the HTML source, it seems that "fckeditor_filters" is empty. Please paste here a similar line:

jQuery.extend(Drupal.settings, { "basePath": "/drupal61/", "fckeditor_filters": { "oFCK_1": [ "filter/0/1" ] },
steveray’s picture

First thing I tried was unchecking all security filters, to no effect. Just tried rechecking HTML Filter, no change.

I found this in the Site Maintenance page: "fckeditor_filters": { "oFCK_1": [ "filter/0/1" ] }

steveray’s picture

Only the user 1 admin account has the problem.

I had logged in last night as user 1 admin to run update.php after updating drupal and fckeditor.

If I logout and then login using my regular admin account then FCKEditor works.

rajmataj’s picture

Priority: Normal » Critical

I too am having this problem after updating to the most recent version of fckeditor. None of my security settings were changed.

Here is the jQuery code from the source of an editable, fckeditor-enabled page:

jQuery.extend(Drupal.settings, { "basePath": "/", "ahah": { "edit-attach": { "url": "/upload/js", "event": "mousedown", "keypress": true, "wrapper": "attach-wrapper", "selector": "#edit-attach", "effect": "none", "method": "replace", "progress": { "type": "bar", "message": "Please wait..." }, "button": { "attach": "Attach" } } }, "fckeditor_filters": { "oFCK_1": [ "filter/0/1", "filter/3/1" ] }, "teaserCheckbox": { "edit-teaser-js": "edit-teaser-include" }, "teaser": { "edit-teaser-js": "edit-body" }, "tableDrag": { "upload-attachments": { "upload-weight": [ { "target": "upload-weight", "source": "upload-weight", "relationship": "sibling", "action": "order", "hidden": true, "limit": 0 } ] } } });

Any help would this would be really appreciated. I really need to get this going again... Thanks.

vstmusic’s picture

same problem : Blank field with the last version of the module : 6.x-1.3-rc5. I did not have this bug when I used 6.x-1.3-rc3.

rajmataj’s picture

Reverted the module back to 1.3 rc3 and everything works like it used to.

Thank goodness for doing my daily TimeMachine backups...

Steve Dondley’s picture

One more symptom for me is that this bug occurs for textareas that do not have an "input format" setting associated with it. Other textareas that have the input filter form element attached to the textarea, work fine.

Steve Dondley’s picture

And here's another symptom I forgot to mention. When the devel module is enabled. The contents of all textareas are replaced with this:

Queries taking longer than 5 ms and queries executed more than once, are highlighted. Page execution time was 305.03 ms.
ms # where query

Strange, to say the least.

Steve Dondley’s picture

Following up on some suggestions above:

I had all the "security" checkboxes in fckeditor unchecked. Checking off "HTML filter" per suggestion above had no effect.

Also, this occurs for all users who can use fckeditor, whether they are uid == 1 or not.

Steve Dondley’s picture

Oh, and this is for Drupal 5 rc5, not Drupal 6.

steveray’s picture

Forgot to mention, I'm running Drupal 6.6.

Steve Dondley’s picture

OK, for Drupal 5, I commented out line 200 withing the fckeditor_process_form() in the fckeditor.module and things work now. Obviously, this is a temporary measure. But it should help find the problem. Here's the code that was commented out and the surrounding lines:

199      if (isset($element['#id']) && in_array($element['#id'], array_keys($_fckeditor_js_ids))) {
200        //$found_textareas[$element['#id']] = &$element;
201     } 
wwalc’s picture

@RajP, @Steve and others: on which fields did this error show up? When editing a normal Page/Story? What input format was assigned during editing and what filters were associated with this input format?

Thanks for the tip with the Devel module, this is another thing to check.

Steve Dondley’s picture

@wwalc

As mentioned, it occurs for me on every textarea that does *not* have the input format field element (the radio buttons that allow you to select the input filter).

wwalc’s picture

@Steve - I'm trying to reproduce it locally... I have set up a pretty similar environment to yours, I'm on PHP4, I have Drupal 5 installed along with the devel module. I open admin/settings/site-information, where I have two textareas with FCKeditor enabled, without the input format assigned. What I have in the HTML source of my page is:

Drupal.extend({ settings: { "basePath": "/drupal52/", "fckeditor_filters": { "oFCK_1": [ "filter/0/1" ], "oFCK_2": [ "filter/0/1" ] } } });

In Firebug, in "Console" tab, I have two AJAX requests (POST) to /drupal52/fckeditor/xss.
The following arguments are sent:

filters[] filter/0/1
text	<p>mission</p>

and the response is:

<p>mission</p>

Could you check admin/settings/site-information in your Drupal installation and let me know any differences you see?

Steve Dondley’s picture

@wwalc

<script type="text/javascript">Drupal.extend({ settings: { "admin_menu_margin_top": 1, "basePath": "/", "fckeditor_filters": { "oFCK_1": [ "filter/0/1" ], "oFCK_2": [ "filter/0/1" ] } } });</script>

My Firebug console only contains >>>. Not sure if I'm using it properly, however.

wwalc’s picture

FileSize
75.04 KB

Make sure that in Firebug the "Show XmlHttpRequests" option is enabled, you should have something similar as shown in the attachment.

Steve Dondley’s picture

Yeah, I have "Show XmlHttpRequests" enabled. See attached.

wwalc’s picture

It seems that I'm missing something obvious here, but what???
@Steve, (sorry for asking this) did you try to resize this window to see if there is something below "<<<"?
I suppose you will have the same result as in comment #4... (filters[] undefined).

btw. I've sent you a PM, don't worry if that's impossible.

Steve Dondley’s picture

OK, I figured out how to resize firebug. When I load the response. I see this under the "Post" tab in Firebug:

filters[]	undefined
text	<p>test</p>

I see nothing under the "Response" tab. It's blank.

wwalc’s picture

Ok, anyone having this issue please try the latest dev release and let me know whether this issue is fixed or not in your Drupal installation.

steveray’s picture

Version: 6.x-1.3-rc5 » 6.x-1.x-dev

I just installed FCKEditor 6.x-1.x-dev (on a Drupal 6.6 platform) and found the problem is fixed.
I could not edit the maintenance mode message under user-1 before, now I can.

I'm short on time right now for further testing, but I'll reply again if I find anything else.
Thanks!
Steve R.

armyofda12mnkeys’s picture

So for Maintainance Mode type input, where no input format is available... Does it run through a default filter like 'Filtered Html' Filter if fck xss security always are set to run?

wwalc’s picture

@RajP, vstmusic - did you try the dev release?

@armyofda12mnkeys - yes, if "Filtered Html" is checked in the FCKeditor settings, this filter should be called if no input format is assigned to a textarea.
I guess that you would like to have an additional option to change the default filter?

arlind’s picture

UPDATE: It works suddenly :-)
-----------------------------
Hi

I still get the same problem with 1.x-dev:

(Drupal 6.6, FCKeditor 2.6.3, Firefox 3.0.4)

....loading....
Firebug's log limit has been reached. %S entries not shown. Preferences
Firebug's log limit has been reached. %S entries not shown. Preferences
Firebug's log limit has been reached. %S entries not shown. Preferences
Firebug's log limit has been reached. %S entries not shown. Preferences
POST http://s-norden.org/fckeditor/xss
http://s-norden.org/fckeditor/xss
945ms jquery.js?G (line 13)
FCKTools.FixCssUrls is not a function
(?)()fckedito...lFiltered (line 203)
[Break on this error] window.document.dir = FCKLang.Dir ;
fckedito...lFiltered (line 203)
FCKLang is not defined
[Break on this error] FCK.ContextMenu={};FCK.ContextMenu.Liste...Commands.GetCommand(A.Name).Execute();};
fckedito..._gecko.js (line 106)
FCKLang is not defined
[Break on this error] window.document.dir = FCKLang.Dir ;
fckedito...lFiltered (line 203)
FCKLang is not defined
OpenDialog()(Document fckeditor.html?InstanceName=edit-body&Toolbar=DrupalFiltered)fckedito..._gecko.js (line 99)
FCKToolbarSet_Create(undefined)fckedito..._gecko.js (line 99)
LoadToolbar()fckedito...lFiltered (line 225)
LoadToolbarSetup()fckedito...lFiltered (line 220)
onload()()fckedito...lFiltered (line 215)
[Break on this error] function FCKToolbarSet_Create(A){var B;v...0;i fckedito..._gecko.js (line 99)

wwalc’s picture

Status: Active » Fixed

@arlind - great to hear that. Probably that was the cause: http://drupal.fckeditor.net/troubleshooting#6

Marking as fixed then. If nobody reopens this ticket in a couple of days, a new RC6 candidate will be released (after fixing #338923: Improve description of security setting).

rajmataj’s picture

wwalc,

Your attention to the troubleshooting forum is appreciated. I haven't been back here in a while since after reverting to rc3 I got the editor to show up again. To answer your questions:

1. on which fields did this error show up?
On any and all where fckeditor used to show up. I did follow the upgrade instructions to the letter and cleared both my browser and drupal (6.6) cache. That didn't seem to change anything unfortunately.

2. What input format was assigned during editing?
It was set to Filtered HTML with the allowable tags matching those that are in the Basic Toolbar. The input format was available to any authenticated user, which I was at the time (not Admin, but it didn't work as Admin either).

3. Did [I] try the dev release?
I downloaded/upgraded to 6.x-1.3-rc5, but not the alpha you have up there currently.

Since rc3 is working fine for me, I'll leave it at that for now until the next alpha is a stable release - then I'll try carefully upgrading again. Thanks.

rshannon’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev
FileSize
128.7 KB

Although fckeditor is working fine in IE, this problem persists in Firefox 3.0.4, with 6.x-2.x-dev, FCKEditor 2.6.3, and Drupal 6.6. No text area under "Body". Firefox error console snapshot attached.

rshannon’s picture

Status: Fixed » Active

Per previous comment, changing status to active.

wwalc’s picture

@rshannon - It seems that your problem is slightly different. This ticket is about FCKeditor showing up with empty content. In your case, FCKeditor does not appear correctly. I have seen similar errors many times when browser was using the old javascript files. Could you please try clearing browser cache and let me know the result?

rshannon’s picture

Status: Active » Fixed

My bad. All OK now, except for foot in mouth disease and terminal embarrassment. I really thought I had done that already, multiple times, no less. I tried everything else in this thread too. Thanks.

wwalc’s picture

No problem ;-) thanks for testing the dev release.

Status: Fixed » Closed (fixed)

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

pixelpreview@gmail.com’s picture

hello,
I don't see fckeditor on my edit pages, only on textarea on edit page
when I open my errors window in firefow, I see this :
"
body.val() is undefined
http://mysite/misc/teaser.js?u

"
it seems that's a big problem because it breaks js ...
see this post, it's for drupal 7 but I think that the same problem is in drupal 6.

http://drupal.org/node/336517

pixelpreview@gmail.com’s picture

yes it works for me when I apply the patch on this node
http://drupal.org/node/336517

fckeditor is ok on my edit pages !

Status: Active » Closed (fixed)