Hi all,

I'm sorry if this has been answered before - I've looked, but was unable to find an solution. I'm working with CKeditor & CKfinder on Drupal 6.x using the CKeditor module. I've gotten everything seemingly set up, except for one critical glitch I can't figure out. I'm sure it's something simple, but I can't find it for the life of me. Any tips on where to look would be appreciated. The problem:

When clicking on the 'browse server' button on the link, image, or flash dialog, CKloader comes up with the appropriate directory & thumbnails, as expected. However, selecting a file populates the url field with a bogus url. The url should be (for an image):
/userfiles/image/filename.jpg

What shows up is:
/fcsweb/sites/all/../userfiles/image/filename.jpg

Now, '/fcsweb/' is the drupal base installation. '../userfiles' is the file system path in site configuration > file system in drupal. In the ckeditor module, the file browser settings are set to ckfinder, with a path to uploaded files of '/userfiles/' and an absolute path of '/kunden/homepages/xx/xxxxxxxx/htdocs/userfiles/'. That's also the $baseDir in confg.php of ckfinder, and $baseUrl is 'http://mydomainname.com/userfiles/'.

I think that's everything. Anything you can offer would be much appreciated - even if you could point me to which one of the 3 systems (finder, editor, or drupal module) is messed up, that would be a big help. I'm really hoping this solution will pan out - it's just a slick solution if I can get it to work.

Comments

techcord’s picture

A little more data:

the '../userfiles' section of the bogus URL is definitely coming from the 'file system path' setting in site configuration > file system in drupal. When I change what's there, it changes in the ckeditor dialogs. I still have no idea where the '/fcsweb/sites/all/' section is coming from, or why it's trying to use the 'file system path' setting when there's a perfectly good setting for file uploads in the ckeditor module. I think it's safe to say that the ckeditor module is involved in this somehow. Any thoughts on where I should look? Again, thanks for the great work y'all have done on this already!

techcord’s picture

Status: Active » Closed (fixed)

I am a colossal idiot. It turns out that setting is in filemanager.config.php in the includes directory of the ckeditor module. There are variables helpfully named $ckfinder_user_files_path and $ckfinder_user_files_absolute_path. It helps if you set them. If they're not set, the authenticate function tries to set them, and in my case (which is non-standard), didn't do it right. So, there ya go. Amazing what a good night of sleep will do you.

techcord’s picture

Component: Miscellaneous » Documentation
Category: support » task
Status: Closed (fixed) » Active

Hmm.... actually I just noticed that this setting is not mentioned anywhere in the readme.txt section on installing ckfinder. Any chance it could be added to avoid future confusion? Not sure if I assigned the category right for that type of activity, feel free to change.

kmillecam’s picture

@techcord,

What were the paths you used in $ckfinder_user_files_path and $ckfinder_user_files_absolute_path?

wwalc’s picture

@techcord - I know you have already got it working, but perhaps you would like to try setting it up again:

- make sure that filemanager.config.php is included in config.php in the right place (after this line: $baseDir = resolveUrl($baseUrl);)

- make sure that filemanager.config.php is really included by CKFinder (you may try using absolute path instead of relative suggested in README.txt, especially if CKFinder is located in different place than suggested in readme)

I have set paths in advanced settings exactly as you suggested and it worked for me.

wwalc’s picture

Status: Active » Closed (fixed)