Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Trivial
-
Resolution: Duplicate
-
Affects Version/s: 4.7.2
-
Fix Version/s: Unscheduled
-
Component/s: None
-
Labels:None
-
Versioning Impact:Patch (backwards-compatible bug fixes)
-
Documentation Required?:None
-
Funding Source:Needs Funding
Description
I was testing the new CKeditor config interface, but my changes were never reflected in the interface.
Digging further, I found that CiviCRM was trying to load:
https://example.org/sites/default/files/civicrm/persist/crm-ckeditor-config.js
instead of:
https://example.org/sites/example.org/files/civicrm/persist/crm-ckeditor-config.js
Looking in the code, it seems that it tries to use [civicrm.files], and this resolves to https://example.org/sites/default/files
Civi/Core/Paths:
public function __construct() { $this ->register('civicrm.root', function () { return \CRM_Core_Config::singleton()->userSystem->getCiviSourceStorage(); }) ->register('civicrm.files', function () { return \CRM_Core_Config::singleton()->userSystem->getDefaultFileStorage(); }) // ... }
CRM/Utils/System/Base.php :
public function getDefaultFileStorage() { // ... elseif ($this->is_drupal) { $siteName = $config->userSystem->parseDrupalSiteName($civicrm_root); if ($siteName) { $filesURL = $baseURL . "sites/$siteName/files/civicrm/"; } else { $filesURL = $baseURL . "sites/default/files/civicrm/"; } // ... }
However, how can the code guess the $siteName from the $civicrm_root ?
$siteName = $config->userSystem->parseDrupalSiteName($civicrm_root);
In my case, the $civicrm_root is /var/aegir/platforms/civicrm-4.7/sites/all/modules/civicrm
Attachments
Issue Links
- duplicates
-
CRM-19303 CKEditor configuration can't be edited on a Drupal multisite installation
- Done/Fixed