Friday, April 27, 2012

cakePHP 2.1, ckeditor + ckfinder

Hello again,

I am working with cakePHP 2.1.0 and have incorporated ckeditor and ckfinder. I have gotten the editor window to come up and even gotten the ckfinder "Browse Server" button to work. What I am having problems with now is that when I hit the "Browse Server" button, the window opens, but gives me the dreaded "Folder not found. Please refresh and try again." error.

I have Googled, and RTFM, but to no avail. I'm not sure what else to do. I have tried using my own file structure, and using the default.

Here is some code:

/*
To make it easy to configure CKFinder, the $baseUrl and $baseDir can be used.
Those are helper variables used later in this config file.
*/

/*
$baseUrl : the base path used to build the final URL for the resources handled
in CKFinder. If empty, the default value (/userfiles/) is used.

Examples:
$baseUrl = 'http://example.com/ckfinder/files/';
$baseUrl = '/userfiles/';

ATTENTION: The trailing slash is required.
*/
$baseUrl = '/js/ckfinder/userfiles/';

/*
$baseDir : the path to the local directory (in the server) which points to the
above $baseUrl URL. This is the path used by CKFinder to handle the files in
the server. Full write permissions must be granted to this directory.

Examples:
// You may point it to a directory directly:
$baseDir = '/home/login/public_html/ckfinder/files/';
$baseDir = 'C:/SiteDir/CKFinder/userfiles/';

// Or you may let CKFinder discover the path, based on $baseUrl.
// WARNING: resolveUrl() *will not work* if $baseUrl does not start with a slash ("/"),
// for example if $baseDir is set to  http://example.com/ckfinder/files/
$baseDir = resolveUrl($baseUrl);

ATTENTION: The trailing slash is required.
*/
$baseDir = resolveUrl($baseUrl);

At the moment, I have authentication turned off. I don't think it will matter as this is in the admin area which has NO public access. Only myself and another admin. 
I have tried to use authentication and couldn't get that working either.

I just don't know what these settings should be. I really like cakePHP, but getting ckfinder has been REALLY mind-blowing. 
I made this conversion b/c my old FCKeditor didn't work when I ported over from 1.2

Any help would be appreciated.

Thanks

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

No comments: