settings.php override for domain => group id

Created on 25 October 2023, over 1 year ago

Problem/Motivation

A common thing is to have dev/stage/localdev environments where you want to test out a "domain" or microsite with a distinct DNS record then the live site. Let's add a means to easily do that.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Active

Version

2.0

Component

Code

Created by

heddn Nicaragua

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @heddn
  • Status changed to Closed: works as designed about 1 year ago
  • heddn Nicaragua

    I figured out this already exists as a feature. $settings['group_domain_mapping']['local-foundation.ddev.site'] = 'foundation.org'; Where local-foundation is the localdev name and foundation.org is the dns name stored in the group domain field.

  • Status changed to Active about 1 month ago
  • 🇫🇮Finland simohell

    Re-opening this issue, if that's ok, instead of a new issue.

    On 3.0.1 and Drupal 11.1.0 at DDEV environment this existing solution seems to work to some extent, but after opining the group edit form and hitting save I get:
    Redirects to external URLs are not allowed by default, use \Drupal\Core\Routing\TrustedRedirectResponse for it.

    On reload things seem seem to work for most part fine, but on views and references I seems to be getting the production domain instead of my development domain if I am already at the development domain. If I'm on the main domain and path /admin/group the group links to development domain but if I open the same page on the group domain it links to the production domain.

    I'm currently the only developer/site builder for that project so I can live with this, but the usability could be improved here.

Production build 0.71.5 2024