Hello folks,

I'm having trouble with my install of CKEditor since I move from my local development machine to the host server. Using CKFinder (or CKEditor's built in upload) images upload properly but the path is incorrect when I send it to the editor, causing a broken image in the editor window. Uploading an image gives me this path /MySite//images/133177.jpg. The double "//" in the path works on my site (for some reason), but on the host server it doesn't. Stripping the extra "/" off in the path field corrects the problem, but I don't want to hand the site over to the client with the error and a workaround.

I see nothing in the CKEditor File Browser settings that would cause the problem, altering the path there doesn't seem to affect the output of the double slash in the image path. (%b%f/) or (%b%f) gives same result. The Drupal file system is set to the default "sites/default/files".

I'm sure it's something obvious, but I'm not clicking into what is the problem.


Status:Active» Postponed (maintainer needs more info)

When you configure CKFinder u probably set $base_url in file: sites/default/settings.php with ending slash, so it's added now each time. If not pls write, we will try to do sth with it.

After check that and change pls write does it help or not.


I actually haven't set $base_url yet for the site since everything seemed fine up to that point. I just now enabled base url and with it uncommented and set to:

$base_url = 'http://www.mysite.com';  // NO trailing slash!

it still brings up the error: double slashes in front of the image path.

Hmm it really weird... Could u send me PM with address to your site and access where i can use CKFinder?
For now i don't have any idea what is wrong...
If u give me access i would check this asap and find solution how to fix it.


subscribe, the same issue on our drupal site.
it works before, after i upgrate to latest version 7.x-1.2, i find this problem.

Status:Postponed (maintainer needs more info)» Active

I can confirm this bug. After upgrade to latest version (DEV in my case) the additional "/" shows in image path.
This is also visible in profile configuration Current path: /drupal7//sites/default/files

Status:Active» Postponed (maintainer needs more info)

Ok this solved my issue http://drupal.org/node/1173294#comment-4548372. @g089h515r806 please check this on your host.

I'm also seeing the same bug as per comments #4 and #5. We're using CKEditor module version 7.x-1.2, with vsn. 3.6.1 of CKEditor and 2.0.2 of CKFinder.

I followed all the README instructions carefully, and in "settings.php" the base URL is set like:

$cookie_domain = 'nottheurl.com';

So there is NO trailing slash at the end of the domain.

But when I upload an image, or use the "Browse Server" button, the image path that appears in "Image Properties" looks like this:
Naturally, when I view the result, it's a broken image.

Like the other comments here, I can find no reason why this extra "/" is being added in the path.

The previous comment said "please check this on your host." Does that mean it's an issue with the web hosting setup? Otherwise, what can be done to fix this bug?



@jimmb no it has nothing to do with hosting setup.
In my case I have '/' at end of $base_url setting.
Please try latest DEV version and check if the problem still occurs there.

Thanks for the reply, Michal. I updated CKEditor to the 7.x-1.x-dev version and tried again. But the same thing happened where an extra "/" was added after uploading an image.

- Jim

Anyone find a fix for this yet?

Version:7.x-1.2» 7.x-1.3

Ok, guys we try check this ASAP.

I am using 7.x-1.x-dev, so I will need to go back to 7.x-1.3?? I am using ckeditor 3.6.1, ckfinder 2.0.2. I also do not have the trailing "/" in my settings file.

@breeze76 you can go back to 7.x-1.3 but I think you can stay with DEV version (latest one).
AS I wrote before we try check this issue ASAP, please be patient.

No problem.. I will wait and keep an eye on this issue.. Thanks...

Status:Postponed (maintainer needs more info)» Needs work

Same issue same result.. Not able to fix it.. guess we will have to wait until you can figure it out...

Posted by michal_cksource on September 7, 2011 at 7:11am

Similar problem is also reported here: http://cksource.com/forums/viewtopic.php?f=10&t=23385&p=59669&hilit=drupal

Check what on your host? The link points to this same posting?


Status:Needs work» Postponed (maintainer needs more info)

I check and i cannot reproduce this. I try to put drupal on domain, subdirectory on Windows and everything works fine...
U must correct set "base_url" and "cookie_domain" variable. Pls check this again and if it doesn't help pls copy here this two variables.
Which version of CKFinder module do u use?


I am using:

ckEditor Module: 7.x-1.x-dev
ckEditor Plugin: 3.6.1
ckFinder: 2.0.2

$base_url = 'http://www.thetrialconcepts.com'; // NO trailing slash!
$cookie_domain = 'thetrialconcepts.com';

If that is any help...

Same issue -- // at front of path instead of single /.

ckEditor Module: 7.x-1.x-dev
ckEditor Plugin: 3.6.1
ckFinder: 2.0.2

$base_url in settings.php is correct -- no trailing slash; $cookie_domain is correct.
CKFinder config.php $baseUrl = /images/
CKFinder config.php $baseDir = resolveUrl($baseUrl), but I've also tried it with the full path, e.g.,
$baseDir = '/home/mysite/public_html/images/ to no effect.

Please help!

Status:Fixed» Needs review
new13.28 KB

Hi guys,
can you check attached patch ?
This is not ideal solution , but please try it and give us a note if it works in your cases.

please don't use this patch
. Use DEV version as described below posts

Status:Postponed (maintainer needs more info)» Fixed


I fix it on other why that @michal_cksource do and use build-in CKEditor module function to return full path to document root without trailing slash. Now absolute path is generated without double slash...

I commit changes to GIT. Pls update to last DEV...


new2.69 KB
new1.75 KB

Hi. I tried the patch. It didn't solve the problem, but I got a couple error messages. In admin.inc, Hunk #7 failed at 890; in lib.inc, Hunk#8 failed at 779 and Hunk #10 failed at 938.

I really don't know much about patches, but I'm attaching the .rej files in case that will help.

Sorry I can't be of more assistance.

@Inemeth, don't use patch... Pls update to last DEV version - I fix this problem there...


Still doesn't work for me -- same "//" double-slash prefacing the path. Are there configuration changes I should be making with the latest dev release?

Do u set $base_url and $cookie_domain?
Do u have $base_url without ending slash?


Status:Needs review» Fixed

Also for me developer version didn't work. I have double slash "//" at the beginning.
I setted $cookie_domain and $base_url without ending slash.

Just to be sure, $baseurl in sites\all\modules\ckeditor\ckfinder\settings.php is ignored in drupal integration? i tried to change this variable but images are uploaded each time in in drupalroot\images\.


hi guys,don't know if this could help a bit on how to solve this.

once upon a time,everything worked fine on my site(on host),the ckeditor,the ckfinder...but one day i installed the backup and migerate module,after installation,it warned me that i should define the private path so i can backup the file into it.then after i set the private path in /admin/config/media/file-system,the %f wildcard in ckfinder's settings refused to work as normal.

i mean ,now,the %f always point to the private path,like"/home/cinfo1/public_html/sitename.com/private/",but not "/home/cinfo1/public_html/sitename.com/sites/default/files/".

so i tried to remove the private path setting,cleared the private field in /admin/config/media/file-system,and the %f in the ckfinder settings returns nothing,the absolute path became "/home/cinfo1/public_html/sitename.com//".seems like the %f just focu on the private path now.don't know why.

http://drupal.org/node/1259510 "Setting a private files folder breaks CKEditor file uploads" i guess this is just what i was talking about.

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

I've had this issue multiple times upon deploying my sites from local to remote.
To clear it up in Drupal 7, I simply go to the CKEditor profiles, and under File Browser, where I can define the paths, I change the paths, save then revert them to default and save again.
This has fixed the issue every time.

So this seems to work if I adjust the settings to omit the actual directory name in the profile settings. I have folders off the drupal root called /images and /files. With "Path to Uploaded Files" set to %b%f/, it inserts the double-slash (//); if I set it to simply %b, everything works! (Absolute path takes the same change, going from %d%b%f to %d%b).

So far, everything seems to be operating properly. Thanks for your work on this, and for a fine, fine module.

Title:File Path incorrect for Uploaded ImagesFile Path to be changed for Images yet to be uploaded


Can someone please help me to change the file storage path for all the files to be uploaded in future. I should be able to categorise files according to their format like images,videos,pdf,css,js etc. They respective files need to be saved in the respective folder.. please let me know the steps as soon as possible