1

I get an error 500 when trying to upload an image to server in CKEditor (for example when using print/merge document action), when the KCFinder new window opens. The URL called is :

https://subdomain.mysite.com/sites/all/modules/civicrm/packages/kcfinder/browse.php?cms=civicrm&type=images&CKEditor=html_message&CKEditorFuncNum=0&langCode=fr

I thought about a https related problem, but this URL :

https://subdomain.mysite.com/sites/all/modules/civicrm/packages/kcfinder/

...is working fine and opens the KCFinder file browser.

Does anyone encountered this problem ? I can't reproduce it on demo site, I am running CiviCRM 4.7.10 with Drupal 7.50. I don't have anything in Apache logs.

I suspect a file / folder permissions issue too, does anyone have an idea on what is going on ?

Thank you

EDIT

I was able to open the file browser using this URL :

https://subdomain.mysite.com/sites/all/modules/civicrm/packages/kcfinder/browse.php??cms=civicrm&type=images&CKEditor=html_message&CKEditorFuncNum=95&langCode=fr (note the "??" just after "browse.php")

...but

https://subdomain.mysite.com/sites/all/modules/civicrm/packages/kcfinder/browse.php?cms=civicrm&type=images&CKEditor=html_message&CKEditorFuncNum=95&langCode=fr (only one "?" after "browse.php") still gives me an error 500.

very confusing...

1 Answer 1

3

My mistake, I left a hack in civicrm.settings.php (and forgot it, it was months ago) which led to this weird behavior. Reverting the hack solves the problem :

// can't remember why I did this 18 months ago, but this is obviously a bad idea...
//require_once './sites/all/modules/civicrm/CRM/Core/ClassLoader.php';
require_once 'CRM/Core/ClassLoader.php';

Many thanks to XDebug, and lesson learned (again :) about hacking CiviCRM code...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.