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

inherit locale and drupal sub-domain language detection and civicrm in a sub-folder

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.3.5
    • Fix Version/s: 4.4.1
    • Component/s: None
    • Labels:

      Description

      Bug specific to:

      • multi-lingual installations with at least 2 languages
      • drupal, using the "domain" to detect the locale (not path prefix)
      • drupal/civicrm is installed in a sub-folder of the web server, ex: http://fr.example.org/mysite/
      • it's a full moon

      In those cases, the CRM_Utils_System_Drupal::languageNegotiationURL() doesn't return the correct URL.

      I will do a PR and more testing, but for now, the patch is:

              //domain
              if ($urlType == LOCALE_LANGUAGE_NEGOTIATION_URL_DOMAIN) {
                if (isset($language->domain) && $language->domain) {
                  if ($addLanguagePart) {
                    $url = (CRM_Utils_System::isSSL() ? 'https' : 'http') . '://' . $language->domain . base_path(); // <- this
                  }
      

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: