Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-19790

Problem with file loading in a multi-domain configuration (Drupal)

    Details

    • Type: Bug
    • Status: Open
    • Priority: Trivial
    • Resolution: Unresolved
    • Affects Version/s: 4.7
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding
    • Verified?:
      No

      Description

      To reproduce :

      • have a drupal multi-domain installation
      • consult CiviCRM on a domain different than the main one
      • configure the CKEditor to fit your need
      • create a new mailing -> CKEditor doesn't take the change into account

      When i look at the code, we can see that default subdirectory is used :

      var CRM = { ... CKEditorCustomConfig":{"default":"https:\/\/civicrm.foundationfuturegenerations.org\/sites\/default\/files\/civicrm\/persist\/crm-ckeditor-default.js"}
      

      The problem is in CRM/Utils/System/Base.php where siteName gives 'default'

      Unable to find source-code formatter for language: php. Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml
      @@ -578,6 +578,7 @@ abstract class CRM_Utils_System_Base {
           }
           elseif ($this->is_drupal) {
             $siteName = $config->userSystem->parseDrupalSiteName($civicrm_root);
             if ($siteName) {
               $filesURL = $baseURL . "sites/$siteName/files/civicrm/";
             }
      

      We should instead use the files sites.php to see what is the main domain for the current domain.

      See also CRM-17521 for a fix related to a similar issue in 4.6.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                samuelsov Samuel Vanhove
              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: