darthsonic's picture
Joined: 20/07/2007
Posts: 7
Re: Firefox 3
Same Problem here! Since upgrading to Firefox 3.0 FCKEditor (using 2.6.1) is not working anymore.
ricoterox's picture
Joined: 18/06/2008
Posts: 2
Re: Firefox 3
fckeditor team.

you are working in this problem right ?

all the comunity of Mozilla is wainting ......


Thx a lot !
martinkou's picture
Joined: 02/08/2007
Posts: 47
Re: Firefox 3
This is a known problem with Firefox 3 when FCKeditor is opened from the local filesystem: https://dev.fckeditor.net/ticket/1645.

The issue is caused by a new security check implemented in Firefox 3 for file:// URIs. It can be disabled by going to about:config and setting security.fileuri.string_origin_policy to false.

See the following Mozilla documentation for more information: http://kb.mozillazine.org/Security.file ... gin_policy
a.m.'s picture
Joined: 20/04/2008
Posts: 256
Re: Firefox 3
martinkou wrote:It can be disabled by going to about:config and setting security.fileuri.string_origin_policy to false.
A typo. Should be security.fileuri.strict_origin_policy
darthsonic's picture
Joined: 20/07/2007
Posts: 7
Re: Firefox 3
A.M. wrote:
martinkou wrote:It can be disabled by going to about:config and setting security.fileuri.string_origin_policy to false.
A typo. Should be security.fileuri.strict_origin_policy


The developers of Firefox got a reason to secure this, so I would not prefer to disable it to get a workaround! I am waiting for a fix.
alfonsoml's picture
Joined: 31/12/2006
Posts: 3759
Re: Firefox 3
DarthSonic wrote:
A.M. wrote:
martinkou wrote:It can be disabled by going to about:config and setting security.fileuri.string_origin_policy to false.
A typo. Should be security.fileuri.strict_origin_policy


The developers of Firefox got a reason to secure this, so I would not prefer to disable it to get a workaround! I am waiting for a fix.

Then install a web server on you machine and use localhost.

At the current state of the restriction made in Firefox, it's impossible to make this work without rewriting everything to change all the locations of the files (and even then I'm not sure if it would work)
martinkou's picture
Joined: 02/08/2007
Posts: 47
Re: Firefox 3
DarthSonic wrote:The developers of Firefox got a reason to secure this, so I would not prefer to disable it to get a workaround! I am waiting for a fix.


The strict origin policy setting in Firefox 3 only applies to file:// URLs, what it does is this:

Let's say you've an HTML in the local filesystem opened in Firefox 3, and the HTML opens another file also from the local filesystem in an iframe. Now, the two documents want to communicate with each other via JavaScript. Strict origin policy means the communication will only be allowed in the following cases:

  1. If the child iframe's file path is under the parent window's file path; or

  2. If the parent window's file path is under the child iframe's file path


So, if you opened something like ../some_dir/some_html.html in the child iframe, Firefox 3 will determine that they are not from the "same origin" even though they belong to the same code package (e.g. FCKeditor, or Dojo, or YUI, etc.), and thus FF3 will give out permission errors.

It is clearly written in the MozillaZine document I gave you that "If you do development with local files and need to be able to retrieve other local files, you may need to set this preference to false". So disabling this security check for local web development is pretty much a standard practice in Firefox 3. Also, since the security check applies to file:// URL only, there shouldn't be any way it can be exploited by malicious remote websites, so the security risks posed by disabling the strict origin policy setting should be minimal.
martinkou's picture
Joined: 02/08/2007
Posts: 47
Re: Firefox 3
alfonsoml wrote:At the current state of the restriction made in Firefox, it's impossible to make this work without rewriting everything to change all the locations of the files (and even then I'm not sure if it would work)

It would be nice if Firefox 3 allows some way of declaring that certain directories belong to the same code package and thus are of the "same origin". Unfortunately there's no way to do this so far. I guess this new security check in Firefox 3 is causing a lot of troubles in locally filed web page as beyond just FCKeditor right now (e.g. Wikipedia on DVDs?).
alfonsoml's picture
Joined: 31/12/2006
Posts: 3759
Re: Firefox 3
I just hope that now that Firefox 3 has been released, enough people face the problem and report it in the proper place (that's it: to the Firefox developers) that they finally add any such measure to allow this kind of pages without problems.

Waiting for a fix in FCKeditor is just wasting the time.
nemlah's picture
Joined: 27/06/2008
Posts: 2
Re: Firefox 3
Hey guys,
We have some trouble with FF3 and FCKEditor as described in these post, but the About:config entry in FF3 is not working and we still get the same error.

The problem is that the error
FCKeditorAPI is undefined

doesn't always occur. First visit on the site works ok, the following visits seem to trigger the error.
The problem description got me thinking that maybe something is screwed with js loads. Whenever it breaks it seems ff is using the files from the cache..
Any help is appreciated

Vasilis
darthsonic's picture
Joined: 20/07/2007
Posts: 7
Re: Firefox 3
nemlah wrote:Hey guys,
We have some trouble with FF3 and FCKEditor as described in these post, but the About:config entry in FF3 is not working and we still get the same error.

The problem is that the error
FCKeditorAPI is undefined

doesn't always occur. First visit on the site works ok, the following visits seem to trigger the error.
The problem description got me thinking that maybe something is screwed with js loads. Whenever it breaks it seems ff is using the files from the cache..
Any help is appreciated

Vasilis


I can confirm this! The error is still existing after the changes in about:config and even with or without the changes the error is only happing the second time I am calling FCKEditor!
kevingessner's picture
Joined: 30/06/2008
Posts: 1
Re: Firefox 3
I was having this same problem, but not at a file:/ url - on a real live site.
I think I've found a solution, thanks to http://dev.fckeditor.net/ticket/1907: simply change
(FCKBrowserInfo.IsSafari||FCKBrowserInfo.IsGecko19)

to

(FCKBrowserInfo.IsSafari/*||FCKBrowserInfo.IsGecko19*/)

on line 38 of editor/js/fckeditorcode_gecko.js. The editor continues to work fine in FF2 and 3, and I was no longer able to reproduce the problem. YMMV, but HTH.
nemlah's picture
Joined: 27/06/2008
Posts: 2
Re: Firefox 3
Hey Kevin,
Thanks for the fix, i tried it and it seems to work. I post again if it find anything else.

Regards
Vasilis
martinkou's picture
Joined: 02/08/2007
Posts: 47
Re: Firefox 3
I've posted a patch to https://dev.fckeditor.net/ticket/1907. If there are no unexpected troubles, the fix should be included in FCKeditor 2.6.3.
chintan's picture
Joined: 06/01/2009
Posts: 1
Re: Firefox 3
hi ,

we made changes as per your comments but still we are facing same Problem "fckEditor is undefined" On line no. 38 in fckeditorcode_gecko.js.
so please if you have any other solution then please post it .

thanks ,

chintan .
imagine-it's picture
Joined: 06/01/2009
Posts: 3
Re: Firefox 3
hi,

I think i'm having the same kind of problem, and i'm not using the newest fckeditor sooo .. i cant change the file fckeditorapi.js, simple cuz the line isn't in it, i get some different error tho, but i think its related too the same problem could any1 help me out, and don't answer with update too the newest fckeditor please ....

here is the error i get in the errorconsole of firefox, i try too add a hyperlink with the fckeditor btw ...
I tested it in IE and there it worked soo there has too be a solution for this no ....

Error: uncaught exception: [Exception... "Node cannot be used in a document other than the one in which it was created" code: "4" nsresult: "0x80530004 (NS_ERROR_DOM_WRONG_DOCUMENT_ERR)" location: "http://.../FCKeditor/editor/js/fckeditorcode_gecko.js Line: 38"]

Anyway thanks on advance
kellett's picture
Joined: 04/03/2009
Posts: 1
Re: Firefox 3
I am still experiencing this problem in FF 3.0.6 using FCK Editor 2.6.3.

The above comments indicate that the issue was resolved in version 2.6.3. I cannot even find the code (FCKBrowserInfo.IsSafari||FCKBrowserInfo.IsGecko19) that causes this bug in order to manually fix it.

I therefore believe that my issue is different. Occurrence of the error is sporadic, and only seems to happen when I insert an image after first-time upload using image assist (on a Drupal site, with image assist installed as Drupal module). If I insert an already uploaded image the error does not come up.

Any suggestions/advice would be most appreciated. In the meantime I will keep digging and make a note if I find the solution.
jainasewen's picture
Joined: 06/03/2009
Posts: 1
Re: Firefox 3
firebug causes it, try disabling firebug for the page that the editors are on and see if that solves the problem
ndycrlr's picture
Joined: 10/03/2009
Posts: 1
Re: Firefox 3
jainasewen wrote:firebug causes it, try disabling firebug for the page that the editors are on and see if that solves the problem

...and then the last post hits the nail on the head. Thanks for posting - Firebug is causing my error.

Andy.