Invalid check in domain_config_ui_save_warning_message

Created on 1 August 2025, about 18 hours ago

Drupal Version

D11

Domain module version

2.0.0-beta3

Expected Behavior

- Message when editing domain config is accurate

Actual Behavior

- Message makes it sound like I'm editing the wrong domain

Steps to reproduce

- Have multiple domains set up
- Enable domain configuration for some settings
- As a user without the 'set default domain configuration' permission, go to edit the config
- As they can't edit all, they don't see the 'All domains' option but you'll see "This configuration will be saved for all domains without custom configuration and displayed in all languages"
- Switch to another domain
- You'll see "This configuration will be saved for the domain and displayed in all languages."

The check is using `!is_null` but I think it should be `is_null`

  // In some cases, the user cannot use 'all domains.' In that case, we have to
  // use the default option as a label.
  if (!is_null($selected_domain) && !\Drupal::currentUser()->hasPermission('set default domain configuration')) {
    ..
🐛 Bug report
Status

Active

Version

2.0

Component

- Domain Config UI

Created by

🇬🇧United Kingdom kimberleycgm

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024