Using Domain Config UI creates *.yml files with duplicate UUIDs.

Created on 6 July 2021, almost 3 years ago
Updated 17 June 2024, 8 days ago

Enabled "domain configuration" on standard 'Basic site settings' page and set unique values for each domain (e.g. Site name).

Exporting config results in config files that have duplicate UUIDs.

domain.config.MACHINE_NAME_1.system.site.yml
domain.config.MACHINE_NAME_2.system.site.yml
domain.config.MACHINE_NAME_3.system.site.yml
etc.

And then import is failing.

There were errors validating the config synchronization.
Rename operation for simple configuration.

Drupal Version 8.9.16

Domain module version 8.x-1.0-beta6

πŸ› Bug report
Status

Needs work

Version

2.0

Component

- Domain Config UI

Created by

πŸ‡¬πŸ‡§United Kingdom featherbelly London, UK

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΈπŸ‡°Slovakia kaszarobert

    We also encountered this issue.
    - set up domains on Drupal site's master branch.
    - create new feature branch where you alter the site title, export the new config and commit.
    - now go back to the master branch, and import config (here we tested something else manually that got merged to master)
    - go back to the previous feature branch and try to import config, you get:

    pc@pc:/var/www/html/ks-graphic.site (master =)$ lando drush cim
    +------------+------------------------------------------------------------+-----------+
    | Collection | Config                                                     | Operation |
    +------------+------------------------------------------------------------+-----------+
    |            | system.site::domain.config.dogbanner_localhost.system.site | Rename    |
    +------------+------------------------------------------------------------+-----------+
    
     Import the listed configuration changes? (yes/no) [yes]:
     > y
    
     [error]  Drupal\Core\Config\ConfigImporterException: There were errors validating the config synchronization.
    Rename operation for simple configuration. Existing configuration system.site and staged configuration domain.config.dogbanner_localhost.system.site. in Drupal\Core\Config\ConfigImporter->validate() (line 794 of /app/web/core/lib/Drupal/Core/Config/ConfigImporter.php). 
    
    In ConfigImportCommands.php line 324:
                                                                                                                                                             
      The import failed due to the following reasons:                                                                                                        
      Rename operation for simple configuration. Existing configuration system.site and staged configuration domain.config.dogbanner_localhost.system.site.
    

    This meant we could not import config anymore, so we had to remove this domain-altered config manually. Therefore, I'm raising priority because it could break the config deployment to QA and production sites.

  • πŸ‡ΈπŸ‡°Slovakia kaszarobert

    Again, the same error I experienced when collegues changed the site name per domain and I tried to import config on a completely different site:

    |            | domain.config.mezotrade_eu.system.site::domain.config.age_attraction_sk.system.site | Rename    |
    |            | system.site::domain.config.age_attraction_sk.system.site                            | Rename    |
    +------------+-------------------------------------------------------------------------------------+-----------+
    
     // Import the listed configuration changes?: yes.                                                                      
    
     [error]  Drupal\Core\Config\ConfigImporterException: There were errors validating the config synchronization.
    Rename operation for simple configuration. Existing configuration domain.config.mezotrade_eu.system.site and staged configuration domain.config.age_attraction_sk.system.site.
    Rename operation for simple configuration. Existing configuration system.site and staged configuration domain.config.age_attraction_sk.system.site. in Drupal\Core\Config\ConfigImporter->validate() (line 794 of /app/web/core/lib/Drupal/Core/Config/ConfigImporter.php). 
    
    In ConfigImportCommands.php line 324:
                                                                                                                                                                                      
      The import failed due to the following reasons:                                                                                                                                 
      Rename operation for simple configuration. Existing configuration domain.config.mezotrade_eu.system.site and staged configuration domain.config.age_attraction_sk.system.site.  
      Rename operation for simple configuration. Existing configuration system.site and staged configuration domain.config.age_attraction_sk.system.site.                             
    

    system.site.yml:

    _core:
      default_config_hash: 5fiO5Le0rk-Y8-wpD231_eVHzGxPd2HtLK4cHmzZ2hw
    langcode: sk
    uuid: f4d6487a-1aec-48b6-9ddd-15a1c7595ded
    name: 'Age attraction'
    mail: mail@example.com
    slogan: ''
    page:
      403: ''
      404: ''
      front: /node/21
    admin_compact_mode: false
    weight_select_max: 100
    default_langcode: sk
    mail_notification: ''
    

    domain.config.age_attraction_sk.system.site.yml:

    _core:
      default_config_hash: 5fiO5Le0rk-Y8-wpD231_eVHzGxPd2HtLK4cHmzZ2hw
    langcode: sk
    uuid: f4d6487a-1aec-48b6-9ddd-15a1c7595ded
    name: 'Age attraction'
    mail: mail@example.com
    slogan: ''
    page:
      403: ''
      404: ''
      front: /node/21
    admin_compact_mode: false
    weight_select_max: 100
    default_langcode: sk
    mail_notification: ''
    

    domain.config.mezotrade_eu.system.site.yml

    _core:
      default_config_hash: 5fiO5Le0rk-Y8-wpD231_eVHzGxPd2HtLK4cHmzZ2hw
    langcode: sk
    uuid: f4d6487a-1aec-48b6-9ddd-15a1c7595ded
    name: 'Mezo trade'
    mail: mail@example.com
    slogan: ''
    page:
      403: ''
      404: ''
      front: /node/28
    admin_compact_mode: false
    weight_select_max: 100
    default_langcode: sk
    mail_notification: ''
    
    
  • πŸ‡¨πŸ‡¦Canada arakwar

    We're using the Drupal 9.4.14 version with Domain 2.0.0-beta1, and have the same issue.

  • First commit to issue fork.
  • πŸ‡ΊπŸ‡¦Ukraine HitchShock Ukraine
  • Open on Drupal.org β†’
    Core: 10.1.x + Environment: PHP 8.1 & MySQL 5.7
    last update 10 months ago
    Not currently mergeable.
  • @hitchshock opened merge request.
  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 10.1.x + Environment: PHP 8.1 & MySQL 5.7
    last update 10 months ago
    88 pass, 10 fail
  • Status changed to Needs review 10 months ago
  • πŸ‡ΊπŸ‡¦Ukraine HitchShock Ukraine

    In general, I would say that the better practice is to add all 'domain.config.*' to the config_ignore.settings.yml and this also will resolve the issue.

    However, I made a quick solution to resolve UUID duplicates.
    It will be nice to test it.

  • Status changed to Needs work 10 months ago
  • πŸ‡ΊπŸ‡¦Ukraine HitchShock Ukraine

    Back to work cuz tests must be reviewed and fixed too.

  • πŸ‡§πŸ‡ͺBelgium Wim Leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    Quoting configuration system maintainer @alexpott from #3405800-20: Config collections do not trigger configuration events consistently β†’ :

    Domain is not using its own StorableConfigBase object - see https://git.drupalcode.org/project/domain/-/blob/8.x-1.x/domain_config/s... - so it will trigger regular config events for it's overrides. Which is incorrect because as with config translations there are only partial representations of configuration and meant to be merged via the override system with active config in the default collection.

  • πŸ‡ΊπŸ‡ΈUnited States brianbrarian

    Are there prospects for a patch anytime soon?

  • πŸ‡§πŸ‡ͺBelgium tim-diels Belgium πŸ‡§πŸ‡ͺ

    I came here with the issue that on a site install with existing config and rename validation was thrown as described in the issue summary.
    The steps are quiet easy to reproduce.

    • Install a website
    • Enable domain
    • Add 2 domains
    • Enable domain_config_ui
    • Add language and domain context to system site page for domains
    • Set config per domain per language
    • Export config
    • Try to reinstall site from config and it should fail

    @HitchShock Thank you for the work in your MR. This looks like the way forward on fixing this issue.

    Not sure how to write tests for site install with existing config.

    But for everyone having this issue:

    1. Use the patch from the MR
    2. Delete the UUID from the config files and re-install
    3. Save the config pages again and export config
Production build 0.69.0 2024