Thought it was related to provision, see my previous issue #2766411: Wrong entry in sites.php for automatic subdomain when URL contains hyphen

When using automatic subdomain hosting, the generated entry in sites.php for the automatic subdomain is broken when a hyphen is present in the site's domain name.

For exemple, creating the site 'test-me.com' with automatic subdomain '.dev' produces the following sites/sites.php:

$sites = array (
  'test--me-com.dev' => 'test-me.com',
  'www.test-me.com' => 'test-me.com',
);

Note the 'test--me-com.dev' which should read 'test-me.com.dev'.

The problem is at line 508 of alias/hosting_alias.module, will try to post a patch later on...

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

PascalAnimateur created an issue. See original summary.

PascalAnimateur’s picture

Here's a patch that removes the str_replace... was there a reason for this string conversion in domain name?

PascalAnimateur’s picture

Status: Active » Needs review
helmo’s picture

I assume it was to be able to differentiate between original dash and a dot replaced by a dash.

I agree that a double does not look nice ... it does work though in dns.

I recall that there was an issue with DNS wildcards in general not liking a dot in the part where you have a wildcard. But it seems to work ok these days. E.g. foo.bar.example.com when you have a *.example.com DNS record.

helmo’s picture

Status: Needs review » Closed (works as designed)

Sorry, but I'm not convinced we need to change this.