Not sure what happened, but CKFinder is only working for UID 1 now on my website. The Browse Server and Upload buttons are missing for everyone else. However it works perfectly fine for UID 1. I've gone through the settings in ckeditor and also gone through the permissions page, but can't seem to find the problem. Any ideas?

I have the latest dev version of the module installed.
CKEditor = 3.6.2
CKFinder = 2.1.1

Comments

mkesicki’s picture

Status: Active » Postponed (maintainer needs more info)

Do you see any errors in Firebug console (Firefox add-on) ? Please also check in Firebug's Net tab if all request are correct. Please check in server error log if any errors show when you try use CKFinder (adding node page).
Did you set "allow CKFinder file uploads" permission for authenticated users ?

jlea9378’s picture

Status: Postponed (maintainer needs more info) » Active

On the Permissions page, under ckeditor, I only have "access ckeditor" and "administer ckeditor". If I log onto a different drupal website that also uses CKFinder, I can see a third option called "allow CKFinder file uploads". Any idea how to get that option back on my main website? Should I uninstall and reinstall CKEditor?

mkesicki’s picture

Please check in status raport page (yourDrupalDomain/admin/reports/status) if there are any problems with CKEditor/CKFinder reported.
Please also check in README file (attached to CKEditor module) in "Installing CKFinder" section if you done all things mentioned there.
In DEV version, in CKEditor Global Profile configuration, there is an option called "Path to CKFinder" . Please check settings for it. This option is to set path to CKFinder.

mkesicki’s picture

Category: support » bug

In ckeditor.module file near line 96 there is a code like:

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

this cause this error, when user has installed CKFinder not as CKEditor subdirectory.
@jlea9378 thank you for help finding this.

jlea9378’s picture

Changing the hook permissions function to this solved it for me:

function ckeditor_perm() {
  $arr = array('administer ckeditor', 'access ckeditor');
  $ckfinder_full_path = ckfinder_path();
  $config_path = realpath('.' . base_path()) . $ckfinder_full_path . '/config.php';
  if (file_exists($config_path)) {
    $arr[] = 'allow CKFinder file uploads';
  }
  return $arr;
}
mkesicki’s picture

Status: Active » Needs review

@jlea9378 thank you for you patch.

jvieille’s picture

Status: Needs review » Reviewed & tested by the community

Perfect!!!

Thank you

mkesicki’s picture

Status: Reviewed & tested by the community » Fixed

This issue should be fixed in latest stable or DEV release. Please check it.
If something is wrong, please reopen this issue.

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

updated ckfinder version