These instructions no longer seem to be valid: http://docs.cksource.com/CKEditor_for_Drupal/Open_Source/Drupal_7/CKFinder because the config.php has changed format.

Does anyone know the method to install CKFinder in Drupal now?

The filemanager.config.php still creates this CheckAuthentication() function and uses $baseDir, which the new CKFinder doesn't seem to use.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Rob230’s picture

Issue summary: View changes
Rob230’s picture

Issue summary: View changes
eesquibel’s picture

I was able to get it working by adding the following to the ckfinder/config.php, right before the last line "return $config". This is with ckfinder being in my sites/all/libraries folder

require_once '../../../../../modules/ckeditor/includes/filemanager.config.php';
$config['authentication'] = 'CheckAuthentication';
$config['backends'][0]['root'] = $baseDir;
$config['backends'][0]['baseUrl'] = $baseUrl;
klevyke’s picture

In the case you have the files in the ckeditor folder you can make it work by changing the first line of the above code to:
require_once '../../../../includes/filemanager.config.php';

cebab54’s picture

This does not work with the latest versions of CKfinder 3 and CKEditor 4

cebab54’s picture

This does not work with the latest versions of CKfinder 3 and CKEditor 4
There is no includes folder any longer

benjarlett’s picture

actually #3 worked for me with ckeditor 4.0.2 and ckfinder 3.4.2 on drupal 7 with ckeditor 7.1.18

gouky10’s picture

In my case drupal 7.58, ckeditor 4.9.1 and i have ckfinder in ckeditor directory
This solution works for me

chdir(dirname(__FILE__));  //----> This is important to change the directory to the actual file
require_once("../includes/filemanager.config.php");
$config['authentication'] = 'CheckAuthentication';
$config['backends'][0]['root'] = $baseDir;
$config['backends'][0]['baseUrl'] = $baseUrl;
jlipfert’s picture

@gouky10 This worked for me, thank you!!!

SilviuChingaru’s picture

#3 works fine for me also.

mfuggle’s picture

I am still having trouble with the installation of CKFinder. I am using Drupal 7.67, Drupal CKEditor Module 7.x-1.18, CKEditor 4.12.1 and CKFinder 3.5.2. I have the CKFinder folder in the ckeditor directory.
When I click the image button on the CKEditor toolbar and then Browse Server I see a modal window and then an error window is displayed with Invalid Request. I have implemented #8 but still get the same result.
I am not sure what '__FILE__' should be. I have set it to '/var/www/prod/public_html/sites/all/modules/ckeditor/ckfinder' which is the location of the config.php file.
If anyone can help I would appreciate it.

Pranay Agarwal’s picture

#3 worked for me.

whiz11’s picture

FileSize
513 bytes

I am having difficulty when i want to automate this through a makefile. I have attached a patch to integrate this change. The patch should be applied on the library ckfinder(sites/all/libraries) and not the module ckeditor

whiz11’s picture

FileSize
519 bytes

I have an issue with the contrib folder. I am adding another patch

whiz11’s picture

FileSize
516 bytes