I can manually set a custom path for ckeditor just fine, but for ckfinder, the module is always looking for it in the module directory. Since all my module updates are automated, ckfinder will get deleted everytime I need to upgrade the ckeditor module. This is why I install ckeditor application under /sites/all/libraries/ and configure the module to look there. So instead of $module_full_path . "/ckfinder/..." should probably read $cke_path . "/ckeditor/..." or allow users to specify a custom path for ckfinder.

Comments

nicholas.alipaz’s picture

+1 for this issue. But not necessarily a bug report, I think this is a feature request.

I would really like to see this fixed. Perhaps the ckeditor_path() function could be rewritten slightly to be used for locating ckfinder in the same way?

--
Los Angeles Web Design and development for Drupal.

nicholas.alipaz’s picture

Category:bug» feature

oops, change status.

nicholas.alipaz’s picture

StatusFileSize
new17.34 KB

Here is a pretty extensive patch to get the work on this started. It currently breaks ckfinder, but it is a start. I don't know enough about the module to confidently say where it is going wrong, but I am sure this is the right direction to take in order to get this functionality in the module.

Please feel free to test this out on a copy and modify. DON'T USE ON LIVE SITE.

Patched against today's cvs checkout of the 1.x branch.

--
Los Angeles Web Design and development for Drupal.

mephir’s picture

Status:Active» Postponed

It will be in 1.3 release.

anirvanroy’s picture

Component:Code» User interface
Category:feature» bug
Priority:Normal» Major
Status:Postponed» Closed (won't fix)

When i use CKFinder the following happens:

Click on image button > Browse Server > double click pic > at this point the URL text box shows //imagesimages/PIC_0111.JPG, where it should actually be /imagesimages/PIC_0111.JPG (only one slash)

how can i change this so it gets the right URL?

here's a test login:
username - test
password - test12345
www.reformpartyindia.org

I believe many ppl are facing this problem

thanks

nicholas.alipaz’s picture

Component:User interface» Code
Category:bug» feature
Priority:Major» Normal
Status:Closed (won't fix)» Postponed

anirvanroy, please open your own issue, this is not related to this feature request. Do not change this one again, as what you did just causes work for more people.

j0rd’s picture

Patch does not work againsn't the stable version (1.1). It applies, but does not work.

I've hardcoded these values in to make it work.
$finder_path = '/sites/all/libraries/ckfinder'
$finder_local_path = '/sites/all/libraries/ckfinder'

Temp solution until I can dig deeper.

Diogenes’s picture

StatusFileSize
new6.65 KB

@j0rd

Could you try this patch and see if it works? I posted it here but no one seems interested. This patch is for ckeditor 6.x-1.1. Copy the patch to the ckeditor directory and apply it from there.

Any other reconfiguring that may be necessary is also explained.

dczepierga’s picture

Issue tags:+6.x-1.3

This option will be added as a new feature in release 1.3

dczepierga’s picture

This option will be added as a new feature in release 1.3

jlea9378’s picture

Status:Postponed» Active

I installed 1.3 but can't figure out how to define the path to ckfinder.

nicholas.alipaz’s picture

Version:6.x-1.1» 6.x-1.x-dev

Looks to me as though the feature was never added. I did a quick search of the commit history and found nothing regarding this issue.

j0rd’s picture

I just updated my CKEditor to the latest version 1.3 from 1.1

I can not find the configurable CKFinder path in version 1.3.

With that said, I applied the patch in post #8 by @Diogenes . While some hunks fails against 1.3 I was able to manually merge them.

After patching ckfinder works fine.

dczepierga’s picture

Title:CKFinder path is not configurable» Auto set CKFinder lib path based on CKEditor lib path
Status:Active» Fixed
Issue tags:-6.x-1.3

I make same changes to @Diogenes patch and commit it to GIT - @Diogenes really thx for patch.

Now CKEditor module automatically set the CKFinder path - it's related with path to CKEditor library, so CKFinder library should be near CKEditor lib - e.g.: if u had CKEditor library in libraries dir, your CKFinder library should be also in libraries dir.

Please check the latest dev release and let me know if you notice any poblems with it. Remember to clear Drupal cache and browsers cache before testing.

Greetings

j0rd’s picture

Super. Thankx.

Status:Fixed» Closed (fixed)

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

mkesicki’s picture

Title:Auto set CKFinder lib path based on CKEditor lib path» Add automatic setting of the CKFinder library path based on CKEditor library path
jlea9378’s picture

Version:6.x-1.x-dev» 6.x-1.6
Status:Closed (fixed)» Needs work

Not sure what's going on... I upgraded ckeditor module from 1.5 to 1.6 and now I'm getting this:

CKFinder is not installed correctly: sites/all/modules/ckeditor/ckfinder/config.php not found. Make sure that you have uploaded all files or didn't remove that file accidentally

And launching ckfinder from the editor no longer works (Page Not Found).

mkesicki’s picture

Try run update.php (drupal script). Clear all drupal cache. Can you check if this file sites/all/modules/ckeditor/ckfinder/config.php exists ?

jlea9378’s picture

I ran update.php and cleared the cache, but that didn't help.

My ckeditor and ckfinder libraries are both located in sites/all/libraries
sites/all/libraries/ckeditor
and sites/all/libraries/ckfinder

It's finding the ckeditor library fine, but for some reason it isn't finding ckfinder. It worked fine prior to upgrading to the newer module (worked on 6.x-1.5).

whikloj’s picture

It looks like ckeditor is back to looking under the ckeditor module. But I could be wrong.

6.x-1.6

function ckeditor_perm() {
  $arr = array('administer ckeditor', 'access ckeditor');
  if (file_exists(drupal_get_path('module', 'ckeditor') . "/ckfinder")) {
    $arr[] = 'allow CKFinder file uploads';
  }
  return $arr;
}

6.x-1.5

function ckeditor_perm() {
  $arr = array('administer ckeditor', 'access ckeditor');
  if (file_exists(dirname(ckeditor_path(TRUE)) . "/ckfinder")) {
    $arr[] = 'allow CKFinder file uploads';
  }
  return $arr;
}

and

6.x-1.6

    switch ($filebrowser) {
      case 'ckfinder':
        if (user_access('allow CKFinder file uploads')) {
          $settings[$textarea_id]['filebrowserBrowseUrl'] = $module_full_path .'/ckfinder/ckfinder.html';
          $settings[$textarea_id]['filebrowserImageBrowseUrl'] = $module_full_path .'/ckfinder/ckfinder.html?Type=Images';
          $settings[$textarea_id]['filebrowserFlashBrowseUrl'] = $module_full_path .'/ckfinder/ckfinder.html?Type=Flash';
          $settings[$textarea_id]['filebrowserUploadUrl'] = $module_full_path .'/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files';
          $settings[$textarea_id]['filebrowserImageUploadUrl'] = $module_full_path .'/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images';
          $settings[$textarea_id]['filebrowserFlashUploadUrl'] = $module_full_path .'/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash';
        }
        break;

6.x-1.5

switch ($filebrowser) {
      case 'ckfinder':
        if (user_access('allow CKFinder file uploads')) {
          $settings[$textarea_id]['filebrowserBrowseUrl'] = $lib_path .'/ckfinder/ckfinder.html';
          $settings[$textarea_id]['filebrowserImageBrowseUrl'] = $lib_path .'/ckfinder/ckfinder.html?Type=Images';
          $settings[$textarea_id]['filebrowserFlashBrowseUrl'] = $lib_path .'/ckfinder/ckfinder.html?Type=Flash';
          $settings[$textarea_id]['filebrowserUploadUrl'] = $lib_path .'/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files';
          $settings[$textarea_id]['filebrowserImageUploadUrl'] = $lib_path .'/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images';
          $settings[$textarea_id]['filebrowserFlashUploadUrl'] = $lib_path .'/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash';
         }
        break;

I'm going back to 1.5 for now.

mkesicki’s picture

@whikloj
Yes, from latest version CKEditor module search CKFinder in ckeditor module directory. That was design decision. We will think about pathes to CKEditor and CKFinder in future versions.

jlea9378’s picture

When will this be fixed? It looks like it's broken still in 6.x-1.7.
I'm still using 6.x-1.5 since I use ckfinder...

My ckeditor and ckfinder libraries are both located in sites/all/libraries
sites/all/libraries/ckeditor
and sites/all/libraries/ckfinder

jlea9378’s picture

Version:6.x-1.6» 6.x-1.8
StatusFileSize
new1.18 KB
new4.54 KB

Attached are some diff outputs (based on Diogenes' patch) that you can use to patch version 6.x-1.7 or 6.x-1.8 to recognize ckfinder.

You can apply them by:
patch ckeditor.install ckeditor_install.patch
patch ckeditor.module ckeditor_module.patch

Sorry if I didn't create the patches per drupal standards, I have no clue how. I've never used CVS.

mkesicki’s picture

Status:Needs work» Needs review

Thx for patches. We will check this ASAP. Please be patient.

jlea9378’s picture

Status:Needs review» Reviewed & tested by the community

RTBC?

mkesicki’s picture

Status:Reviewed & tested by the community» Closed (fixed)
jenlampton’s picture

Status:Closed (fixed)» Fixed

Looks like this bug is back in 6.x-1.14

wwalc’s picture

@jenlampton - from which version did you upgrade to 6.x-1.14?

Status:Fixed» Closed (fixed)

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