My problem is similar to this http://drupal.org/node/520398 but the solution did not work for me.
My Drupal installation is in a sub folder www.example.com/drupal but I want to access it through www.example.com
I'm using clean URLs and pathauto to generate urls similar to www.example.com/drupal/getting-started
My .htaccess
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?example.com$
RewriteCond %{REQUEST_URI} !^/drupal/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /drupal/$1
RewriteCond %{HTTP_HOST} ^(www.)?example.com$
RewriteRule ^(/)?$ drupal/index.php [L]
which redirects example.com to example.com/drupal
My settings.php shows
$base_url = 'http://www.example.com';
which causes Drupal to write the urls as www.example.com rather than www.example.com/drupal.
The FCKEditor shows the html contained within the body tags of the index.php in the root of the site, rather than the page content.
If I delete the htaccess I get the correct content in the FCKEditor.
If I disable the FCKEditor module I get the correct content in the textareas.
This problem was reported here http://drupal.org/node/432122#comment-1748540 but there's no resolution.
Any help would be appreciated, thanks.
Comments
Comment #1
jorrit commentedYou can set the paths to FCKeditor explicitly in the global profile settings, may that helps.
Comment #2
ChocolateTeapot commentedI did try that but they seemed to be correct.
I've worked out why I was seeing the HTML from the root index.php in my FCKEditor field.
FCKEditor makes a call to index.php?q=imce&app=FCKEditor|url@txtUrl|width@txtWidth|height@txtHeight
Requests to index.php weren't being redirected so I added this to my htaccess
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*index\.php(\?[^\ ]*)?\ HTTP/
RewriteRule ^(([^/]+/)*)index\.php$ http://www.example.com/$1 [R=301,L]
Now, however, I'm seeing nothing in my FCKEditor fields that should have data, although when I create a new page the content of the FCKEditor does save, just doesn't then show in edit mode.
Thanks for your help.
UPDATE
The fields only seem to be empty in custom content types that I have created, a Page is showing up correctly for example.
I see the content of the field in a textarea when the page is loading, then I get the FCKEditor with no content and when I click on Source there is no content.
When I switch to the plain text editor I can't see the content.
I CAN see the content in the HTML source.
Comment #3
ChocolateTeapot commentedAnother update:
Comparing the source of the page that works and the page that doesn't work, this seems to be the difference:
<textarea cols="60" rows="20" name="body" id="edit-body" class="form-textarea filterxss2">Test</textarea> (doesn't work)
<textarea cols="60" rows="20" name="body" id="edit-body" class="form-textarea ">Test</textarea> (works)
If I remove filterxss2 from the page that doesn't work I can see the content of the FCKEditor.
I don't know what to do about it though.
Firefox shows the FCKEditor field but Safari shows two instances of /?q=fckeditor/xss being cancelled in the Activity window and a textarea field.
Comment #4
ChocolateTeapot commentedI found the problem.
Although index.php was being redirected with its parameters, and seemed to be working, /index.php?q=fckeditor/xss seemed to be a problem.
I replaced all instances of /index.php?q=fckeditor/xss with /?q=fckeditor/xss in FCKEditor, cleared the cache and it seems to be working now.
Comment #5
jorrit commentedTry to find a solution without modifying FCKeditor module files, otherwise you will need to apply this change every time FCKeditor is updated.
Comment #6
lizac commentedHi! I was actually having the same problem today. Yesterday I bumped in this issue and I can't associate this thing with anything since I did not make any module updates. My problem is
Wrong parameter count for array_filter() in drupal/includes/module.inc on line 462.
Location http://www.website.com/drupal/index.php?q=fckeditor/xss
Referrer http://www.website.com/drupal/node/1161/edit
When I try to edit the node, the editor will not show any content. There's no problem with creating a new content but with editing. The content in blocks show when I try to edit them. Any hep would be appreciated. Thanks!
By the way, I have this - version = "6.x-2.1"
Comment #7
ChocolateTeapot commented@lizac
This was my solution
I never really understood the cause.
As Jorrit said, the solution wasn't ideal as I was changing module files and my changes would have been overwritten with module updates.
Since then I've moved hosting and updated FCKEditor and it just worked.
I've moved on to CKEditor, which also just worked.
Hope this helps.
Comment #8
lizac commented@Chocolate Teapot.
Thank you very much for your response. Unfortunately, the solution you made did not work for me.
I'm a bit desperate now since I've been looking for solution in the past few days. =(
I just hope anyone could lend a hand
Thanks again!