私はCiviCRM 5.2.2でBackdrop CMS
1.10.1を使用しています.CiviMailとCiviContributeの両方に画像をアップロードして挿入するときにkcfinderに問題があります。
最初の問題は500エラーでした。ログのこのビットに基づいて、
[Thu Jul 05 16:53:47.624995 2018] [fcgid:警告] [pid 6591]
[クライアント]
mod_fcgid:stderr:PHP致命的なエラー:未知のエラー:関数名は[site]/public_html/modules/civicrm/packages/kcfinder/integration/civicrm.php:67
私はそれを/kcfinder/integration/civicrm.phpのswitchステートメントに追跡しました
switch ($config->userFramework) { case 'Drupal': case
'Drupal6': $auth_function = 'authenticate_drupal'; break; case
'Joomla': $auth_function = 'authenticate_joomla'; break; case
'WordPress': $auth_function = 'authenticate_wordpress'; break;
}
これはBackdropの場合がないため、$ authfunctionは決して文字列に割り当てられませんでした。
Backdropのケースとauthenticate_backdrop関数を追加しようとしましたが、動作させる方法がわかりません。まず、authenticate_backdrop関数をauthenticate_drupalと同じにしようとしましたが、エラーが出ます:
アップロードした画像を編集、追加、削除するには、適切な権限を持ってログインする必要があります。
私は関数からアクセス許可のチェックを除いてすべてを削除したので、次のようになります:
function authenticate_backdrop($config) { //check if user
It gives me permission, and allows me to upload an image
has access permission... if (CRM_Core_Permission::check('access
CiviCRM')) { error_log("There is permission.") return true; }
}
and insert it. Here is the original file with the authenticate
functions for drupal, joomla and wordpress. https://github.com/civicrm/civicrm-packages/blob/master/kcfinder/integration/civicrm.php
authenticate_backdrop
を実装する正しい方法は何ですか?
CRM_Core_Permission :: checkを持っていればいいですか?
Per comments above, this bug was fixed by @herb in https://github.com/civicrm/civicrm-packages/pull/216