I found by accident that if you put spaces between the comma in the domain input field then the space causes a failed comparison in the code and thus is not triggered.

In the function locale_language_multidomain()
Remove the spaces from the store valu string before exploding

Old code:

        $hosts = array();
        foreach (explode(',', $language->domain) as $host) {

New code:

        $hosts = array();
        $domainListStr = $language->domain;
        $domainListStr = str_ireplace(" ", "", $domainListStr);  //remove spaces
        foreach (explode(',', $domainListStr) as $host) {
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

silvi.addweb’s picture

Status: Active » Needs review
FileSize
1.15 KB

The module works well if you do not add any space between domain names and comma. No patch needed for that.

However, it would be good to check for spaces in anycase. Attached patch checks for spaces and removes it if they are present.