I have been working on my own CMS project and have been successfully using FCKeditor to manage content.
I have now implemented a .htaccess file to rewrite URL's in order to be search engine friendly.
The problem is that now the editor does not display - I have tried both IE and Firefox.
The source code is being written but I notice the inline style has been dynamcially changed which may explain it. The snippit of code is as follows :
<TEXTAREA id=FCKeditor1 style="DISPLAY: none; WIDTH: 98%; HEIGHT: 300px" name=FCKeditor1>
The "DISPLAY:none;" is the bit that has been dynamically added.
I have checked the error console in Firefox but no errors are reported.
Has anyone else experienced this problem ?
Thanks
Nigel
I have now implemented a .htaccess file to rewrite URL's in order to be search engine friendly.
The problem is that now the editor does not display - I have tried both IE and Firefox.
The source code is being written but I notice the inline style has been dynamcially changed which may explain it. The snippit of code is as follows :
<TEXTAREA id=FCKeditor1 style="DISPLAY: none; WIDTH: 98%; HEIGHT: 300px" name=FCKeditor1>
The "DISPLAY:none;" is the bit that has been dynamically added.
I have checked the error console in Firefox but no errors are reported.
Has anyone else experienced this problem ?
Thanks
Nigel
RE: Editor Not Displaying Once .htaccess uploaded
Have you checked your web server access and error logs?
What is in your .htaccess file?
Does FCKeditor work properly if you remove the .htaccess file?
RE: Editor Not Displaying Once .htaccess uplo
Wow that was a quick response . . .
Yes the editor works fine when the .htaccess file is not present.
My .htaccess file is :
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^(.*).html$ index.php?path=$1
RewriteRule ^/admin/(.*) /admin/$1
FCKeditor is located an "admin" hence the rewriterule above for Admin.
Cheers
Nigel
RE: Editor Not Displaying Once .htaccess uploaded
Yes, I responded quickly because I happen to be monitoring this help forum. I'm hoping somebody has an answer for my question about why FCKeditor is removing stylesheets from HTML. Your question was interesting, so I answered.
Anyway, in addition to that .htaccess file, what log files do you have from your web server? Do your logs for requests, access, or errors contain any new messages when you try to use FCKeditor with that .htaccess file in place?
I'm not great with RewriteRule, so please bear with me. I'm referring to the Apache mod_rewrite documentation at:
http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html
In your second rule, I suspect, you intend to correct any FCKeditor URLs changed by the first rule. Is that right?
The problem is that there are several files within FCKeditor that end with .html. For example, editor/fckeditor.html. So, the request from your browser is rewritten like this:
1. original request: /admin/editor/fckeditor.html
2. after rule #1: index.php?path=/admin/editor/fckeditor
3. rule #2 has no effect
So, the question is, what does your index.php do with that "path"?
Check out the mode_rewrite documentation. I think that if you want to avoid rewriting the /admin/ URLs, you should reverse the order of your rules and use the "L" option (for "last") on the /admin/ rule.
RewriteRule ^/admin/(.*) /admin/$1 [L]
RewriteRule ^(.*).html$ index.php?path=$1
Now, any /admin/ requests should be rewritten to be the same as they were and mod_rewrite will not go on to the next rule. Anything that is not a /admin/ request will skip the first rule and go to the next.
You could achieve the same thing by not using a rule for /admin/ at all and using a RewriteCond that says look at anything that doesn't contain /admin/. However, I'm not sure what variable to use in RewriteCond to access the request URL.
Also, see this friendly guide to mod_rewrite:
http://www.workingwith.me.uk/articles/s ... od_rewrite
Basically, you're not having a problem with FCKeditor. You're having trouble configuring Apache. Personally, I avoid using directives in .htaccess files. I would rather let some PHP code do the work. It's a little easier to understand.
RE: Editor Not Displaying Once .htaccess uploaded
BTW, I'm "lsloan", not "Isloan".
RE: Editor Not Displaying Once .htaccess uplo
Hi lsloan
- was too early in the morning for my eyes to correctly focus and read a computer screen !
Thanks for all your feedback and I apologise for the nickname error
I have just updated the .htaccess file as described above but it didn't correct the problem.
I have finally tracked down the log files and the output is copied below for the latest attempt to load FCKeditor.
-----------------------------
121.72.67.1 - - [21/Apr/2007:03:30:25 -0400] "GET /admin/admin.php HTTP/1.1" 200 10203 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)"
121.72.67.1 - - [21/Apr/2007:03:30:33 -0400] "GET /admin/admin.php?obType=content&action=edit&obID=2 HTTP/1.1" 200 15094 "http://www.rangiorafootball.org.nz/admin/admin.php" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)"
121.72.67.1 - - [21/Apr/2007:03:30:34 -0400] "GET /admin/scripts/editor/fckeditor.html?InstanceName=FCKeditor1&Toolbar=Default HTTP/1.1" 200 5 "http://www.mydomainname.co.nz/admin/adm ... dit&obID=2" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)"
----------------------------
I don't really know what I am reading so wonder if this help to shed any light.
From the little I know the status of 200 is normally a good sign . . .
Thanks
Nigel
RE: Editor Not Displaying Once .htaccess uplo
My CMS system works via one file (index.php) and by using .htaccess I can generate SEO friendly URL's.
If there is a way to deal with this via php then I'd love to know about it.
Thanks
Nigel
RE: Editor Not Displaying Once .htaccess uplo
I have identified differences in the log files for my site - when .htaccess is not loaded at the root level of the site (and the editor functions as expected) the following log file entry is recorded :
121.72.67.1 - - [21/Apr/2007:16:05:22 -0400] "GET /admin/scripts/editor/skins/default/images/toolbar.collapse.gif HTTP/1.1" 304 - "http://www.mysite.org.nz/admin/scripts/ ... ar=Default" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)"
This is not recorded when the .htaccess file is loaded on the site.
Any suggestions from anyone ?
Thanks
Nigel
RE: Editor Not Displaying Once .htaccess uplo
Finally tracked the issue down to the main URL rewrite.
I removed the main rewrite rule and tried again - magically it all worked fine.
So after a few tests of different combinations I simply added a slash to the start of the rewrite and everything now seems to be working fine.
Old Code :
RewriteRule ^(.*).html$ index.php?path=$1
RewriteRule ^/admin/(.*)$ /admin/$1 [L]
New Code :
RewriteRule ^(.*).html$ /index.php?path=$1
RewriteRule ^/admin/(.*)$ /admin/$1 [L]
Note the extra '/' in "/index.php?path=$1"