Problem/Motivation

From discussion on #3178061: Conflict resolution for multiple Domain Aliases on same environment it would seem the root cause could be that the domain alias is not being derived correctly when it is provided via a drush command.

Steps to reproduce

1. Install domain_alias module
2. Create a domain "www.example.com"
3. Setup these aliases on that domain for the DEV environment in this order:
- dev.example.com
- exampledev.prod.acquia-sites.com
4. Setup these aliases on that domain for the STAGE environment in this order:
- exampletest.prod.acquia-sites.com
- stg.example.com
5. Deploy these changes to DEV and STAGE
6. SSH into DEV and notice the Domain loads to "dev.example.com"
drush php:cli -l https://dev.example.com
>>> echo \Drupal::entityTypeManager()->getStorage("domain")->load("example_com")->get("hostname") . "\n";
dev.example.com
7. SSH into STAGE and notice the Domain loads to "exampletest.prod.acquia-sites.com"
drush php:cli -l https://stg.example.com
>>> echo \Drupal::entityTypeManager()->getStorage("domain")->load("example_com")->get("hostname") . "\n";
exampletest.prod.acquia-sites.com"

The human doing this might expect "stg.example.com" to load because that is the domain passed via the CLI. However, it's not!

Proposed resolution

TBD

Remaining tasks

TBD

User interface changes

TBD

API changes

TBD

Data model changes

TBD

Issue fork domain-3179682

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

josephdpurcell created an issue. See original summary.

maacl’s picture

Drush listens to a environment variable DRUSH_OPTIONS_URI to allow setting the current host in CLI commands. Did you try that? drush user:login is another example, where this may needed, regardless of the usage of domain access.

agentrickard’s picture

Status: Active » Postponed (maintainer needs more info)

Joe --

Did the fixes in the other issue solve this problem?

mably’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)
mably’s picture

Status: Closed (outdated) » Postponed (maintainer needs more info)

Unless new, valuable information is provided, this issue will be closed in 3 months.

mably’s picture

Category: Bug report » Feature request
mably’s picture

mably’s picture

Version: 8.x-1.x-dev » 2.0.x-dev
mably’s picture

The solution here is to create two new environments, it could be DEV-ACQUIA and STAGE-ACQUIA for example.

mably’s picture

Status: Postponed (maintainer needs more info) » Needs review

  • mably committed 31b1d8fd on 3.x
    Issue #3179682 by josephdpurcell, mably: Correctly derive domain alias...
mably’s picture

Version: 2.0.x-dev » 3.x-dev
Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.