I'm having a problem involving CKEditor, IMCE and Domain Access.
My Drupal installation is in a subdirectory (www.example.com/x).
I have several subdomains using the same setup, through the Domain Access module.
All site images that are sent by any module appear correctly on all subdomains.
Except the images that are sent through the CKEditor / IMCE.
I realized that the IMCE put a slash "/" in front of the path, which is causing the problem.
All images are generated in drupal with the resulting path WITHOUT the initial slash. Ex: "sites/default/files/img.jpg".
Thus, regardless of domain or subdirectory, the path will always be correct.
ex:
1) www.example.com/x/sites/default/files/img.jpg (primary domain with Drupal installed in subdirectory "x".
2) test.example.com/sites/default/files/img.jpg (the same image through the subdomain "test" (without the subfolder "x").
Now, due to this unfortunate inclusion of "/" at the beginning of the path causes the Drupal create the subfolder path WITHOUT "x":
ex:
www.example.com/sites/default/files/img.jpg
Now, if I manually edit the image path in CKEditor, removing the "/" at the beginning, the problem is corrected. (But Image does not appear in the editor, only when viewing the node.)
In short, what can be done to solve this problem?
Comments
Comment #1
mkesicki commentedCan you check if this issue occurs without "Domain Access" module ?
Comment #2
rogeriodec commentedAlthough this problem of generating the slash has nothing to do with the Domain Access module, even though I uninstalled it.
Nothing has changed:
1) Clicking on the image of IMCE is the path to "/" at the beginning.
2) By removing the "/" manually from the beginning of the path, the CKEditor shows only the picture frame without the picture.
3) However when showing the saved node, the image appears correctly (this was the only solution I found to work with Drupal installed in a subfolder).
In short, what can be corrected for CKEditor not generate this "/" at the beginning of the Path (and display the image correctly on the edition)?
Comment #3
mkesicki commentedOk, we will check this please be patient. Thx for notice this
Comment #4
mkesicki commentedI checked this with latest IMCE release and DEV version of CKEditor module.
I tested this with host like http://drupal.localhost and http://localhost/drupal (drupal as subdirectory of server) and '/' at start doesn't break anything. The problem is in moment when I change one type of host to another and I think this is exactly your situation (different host and the same configuration of drupal). I think that how it works now will be ok for most users. Maybe we will change this in future versions. For now I postpone this ticket. Of course you can always create a patch :)