Hello,
I just upgraded FCK Editor from version 2.4.3 to 2.5.1. In the process of testing the new version I found myself stuck at an issue that only after some good few hours of troubleshooting I was able to resolve. I thought posting the issue here in case someone else has the same problem, or in case someone can point me to a different solution.
PROBLEM:
After installing version 2.5.1 attempts to open the editor using PHP returns the following errors:
IE7: Displays only first two rows of toolbar. Returns JS error: "The download of the specified resource has failed", URL: http://mysite/fckeditor/editor/fckedito ... ar=Default
FF: "No element found" http://mysite/fckeditor/fckstyles.xml
TROUBLESHOOTING:
* I checked if my webserver was serving xml files in the correct mime format
** I'm using Apache 2.2.4 and in mime.types I find: "application/xml xml xsl". I also tried adding "AddType text/xml .xml" to .htaccess and httpd.conf, no help.
* I tried to access the fckstyles.xml file directly in my browser and got the following results:
IE7: "Internet Explorer cannot display the webpage"
FF: "XML Parsing Error: no element found" / "Location: http://mysite/fckeditor/fckstyles.xml" / "Line Number 1, Column 1:"
Because I was able to open other xml files in the same folder I suspected there was something wrong with the fckstyles.xml file.
MY SOLUTION:
I opened the fckstyles.xml in a text editor and removed all comments located between the tag "<Styles>" and "<Style name="Marker: Yellow" element="span">" and saved it.
After doing so, I was able to open the file directly in IE7 and FF without errors. Then when calling the editor it run without errors.
COMMENTS:
One other thing I tried was to install FCK 2.5.1 on another web server and there it worked ok. Apparently my problem was only when testing it on my local computer using Apache 2.2.4 on Windows Vista, PHP 5.
Well that's it. Either I missed something in my install or there is something in the fckstyles.xml files that causes it to not parse properly on Windows Vista.
Thu, 01/24/2008 - 23:16
#1
Re: Errors loading fckstyles.xml on Windows Vista workstation
Thanks.
Re: Errors loading fckstyles.xml on Windows Vista workstation
I have the impression that the problem was not with the comments but with the fact that the XML files distributed with FCKeditor are UTF-8 encoded. As you have edited it, probably your editor saved the file in ANSI and that worked well with your Apache installation.
Well... that was just a guess... it would be enough to just open and save the original file to see if it works.
In any case, I would suggest you opening a ticket for it at our dev site.
Frederico Knabben
CKEditor Project Lead and CKSource Owner
--
Follow us on: Twitter | Facebook | Google+ | LinkedIn
Re: Errors loading fckstyles.xml on Windows Vista workstation
you can simply resolve this issue by removeing all comments of fckstyles.xml
Hope this helps.
~ Suketu vyas
http://www.suketuvyas.com
Re: Errors loading fckstyles.xml on Windows Vista workstation
I am having the same issue. Can somebody please post a copy of a clean fckstyles.xml file. I have tried unsuccessfully to remove the comments and still get the error. The editor follows up by a JS error: '$Style' is null or not an object
Re: Errors loading fckstyles.xml on Windows Vista workstation
I am using ASP version.
Localy it working fine. But from my windows 2003 server, I'm getting Errors loading fckstyles.xml.
I tried to remove all comments in fckstyles.xml, still not working.
Same problem with javascript sample 1 to 13. Only Sample 14 working.
Same problem with ASP sample 1 to 4.
URL requested: "/fckeditor/fckstyle.xml"
Server response:
Status: 200
Response test: <?xml version="1.0" encoding="utf-8" ?>
...
Re: Errors loading fckstyles.xml on Windows Vista workstation
The problem could be that the document effectively has two root nodes (a comment, and a <Styles>). Multiple root nodes are possibly invalid. Try moving the <Styles> opening tag to *before* the first comment, i.e. to line 2.
Please advise whether this resolves the issue!
If not, try this:
1. Download and install Visual Web Developer Express (unless you already have Visual Studio):
http://www.microsoft.com/express/vwd/
2. Open your fckstyles.xml in VWD or VS
3. Use the menu: Edit -> Format Document
4. Save
This will tidy up all the document's formatting. I've seen XML reported as invalid just for having a blank line in between two nodes.
There are probably other editors that provide a similar feature but I mainly use VS.