When Domain Alias module saves domain alias with wildcards it replaces wildcards with mysql-compatible placeholders, see
domain_alias.admin.inc
function domain_alias_form_submit($form, &$form_state) {
...
$alias['pattern'] = _domain_alias_placeholders_to_sql($alias['pattern']);
}
and domain_alias.module
/**
* Replace placeholders * and ? with SQL placeholders % and _
*/
function _domain_alias_placeholders_to_sql($subdomain, $reverse = FALSE) {
$placeholders = array('*' => '%', '?' => '_');
if ($reverse) {
return str_replace($placeholders, array_keys($placeholders), $subdomain);
}
else {
return str_replace(array_keys($placeholders), $placeholders, $subdomain);
}
}
But, when Feature module recreates saved aliases it does not: it puts 'example.com.*' instead of 'example.com.%' and such aliases don't work.
Comments
Comment #1
Sergii commentedAnd here's the patch (see attachment).
In domain_alias.feature.inc was a comment describing this behavior:
But that's not correct.
When domain alias prepares feature export it uses internal function that returns alias pattern containing not mysql placeholders, but original string:
domain_alias.feature.inc:
domain_alias.module:
Comment #2
agentrickardNice catch.
Comment #3
agentrickardPatch is malformed. Contrib patches should be rolled from the module's root directory.
Comment #4
agentrickardComment #5
Sergii commentedSorry, this is my very first path :)
Comment #6
agentrickardNo problem. It worked just fine, thanks!
Comment #7.0
(not verified) commentedfix typo