Using IMCE with the Ckeditor module most everything seems to work fine, except for browsing existing files. I can see them and select them, but the path that gets generated for them is missing part of the path to my root directory. If I edit the link manually the image shows up, but I was thinking there should be some way to consistently have it come up with the correct path.

My files are stored in the root/images directory, which I can browse and upload to just fine. When I select a file from there, the path shown is: sites/default/files/images/filename but it needs to be /product/sites/default/files/images/filename

My Drupal installation is in the product directory, but I have the base URL set accordingly. IMCE browses the right location, but when it creates the path to the file I select it doesn't work unless I add /product/ to the beginning. What am I missing here?



Are you sure CKeditor does not rewrite the path that IMCE returns?

No, I am not sure. The path that appears in the CKeditor image window is missing the sub directory and the /. Is there a way to tell the path coming from IMCE? All of the path references in IMCE seem to be relative to root and the problem seems to be the path to root, so that is a definite possibility. I will investigate further with CKeditor. Thanks.

I am leaning towards this being a Ckeditor issue. In the IMCE window it shows the full text of the image link properly, and changes properly whether "Absolute URLs" is checked. So, it appears to be Ckeditor's interpretation. Thanks for the tip.

Ok, I found it. It was within IMCE, but someone elsewhere in our organization had changed imce.js without my knowledge. The correct initial text was:
fileGet: function (fid) {
var row = imce.fids[fid];
var url = imce.getURL(fid);

and it was improperly changed to:
fileGet: function (fid) {
var row = imce.fids[fid];
var url1 = imce.getURL(fid);
var url = url1.substr(url1.indexOf("sites"));

Which broke the URL that showed up in the editor. Moral of the story, make sure you have the code you think you have, and when in doubt replace the module with a clean download to see if it fixes it. Thanks for the help.

Status:Active» Fixed

Status:Fixed» Closed (fixed)

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

Issue summary:View changes

Correcting typos