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

Can't install extensions in /vendor/civicrm when using Drupal + path prefix language negotiation

    Details

    • Type: Bug
    • Status: Open
    • Priority: Trivial
    • Resolution: Unresolved
    • Affects Version/s: 4.6
    • Fix Version/s: Unscheduled
    • Component/s: None
    • Labels:
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None

      Description

      In the following environment:

      If we install CiviCRM extensions in /vendor/civicrm/, and those extensions load custom CSS files, the URL generated for those CSS files will include the language prefix as well.

      If you look at CRM/Core/Config.php, _setUserFrameworkConfig :

      if (defined('CIVICRM_UF_BASEURL')) {
      $this->userFrameworkBaseURL = CRM_Utils_File::addTrailingSlash(CIVICRM_UF_BASEURL, '/');

      //format url for language negotiation, CRM-7803
      $this->userFrameworkBaseURL = CRM_Utils_System::languageNegotiationURL($this->userFrameworkBaseURL);
      [...]

      Then in CRM/Extension/System.php getFullContainer(), we see :

      $containers['cmsvendor'] = new CRM_Extension_Container_Basic(
      $vendorPath,
      $this->parameters['userFrameworkBaseURL'] . DIRECTORY_SEPARATOR . 'vendor',
      $this->getCache(),
      'cmsvendor'
      );

      And so userFrameworkBaseURL gets used for the URL base for CSS.

        Attachments

          Activity

            People

            • Assignee:
              mlutfy Mathieu Lutfy
              Reporter:
              mlutfy Mathieu Lutfy
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: