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

Created on 6 July 2021, over 3 years ago
Updated 3 September 2024, 2 months 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

✨ Feature request
Status

Needs review

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

Merge Requests

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 about 1 year ago
    Not currently mergeable.
  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 10.1.x + Environment: PHP 8.1 & MySQL 5.7
    last update about 1 year ago
    88 pass, 10 fail
  • Status changed to Needs review about 1 year 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 about 1 year 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
  • πŸ‡ΊπŸ‡ΈUnited States agentrickard Georgia (US)

    MR is out of date and needs a refactor.

  • πŸ‡ΊπŸ‡ΈUnited States agentrickard Georgia (US)

    Marking as a fearure. Domain Config UI is a *convenience* module and experimental. Developers can work around this issue as noted or by using Domain Config directly.

  • First commit to issue fork.
  • Pipeline finished with Failed
    3 months ago
    Total: 214s
    #242052
  • πŸ‡¨πŸ‡¦Canada slydevil Halifax

    Patch for 2.0-beta attached.

  • πŸ‡­πŸ‡ΊHungary denes.szabo Hungary

    Re-rolled the patch against the latest dev 2.0.x.

  • πŸ‡«πŸ‡·France dqd London | N.Y.C | Paris | Hamburg | Berlin

    #14 has described a workaround already (thanks Steffen!) and this is not breaking a site so decreasing issue prio...

    Descriptions of the Priority β†’ and Status β†’ values can be found in the Drupal project issues β†’ documentation.

  • Status changed to Needs review 2 months ago
  • πŸ‡«πŸ‡·France dqd London | N.Y.C | Paris | Hamburg | Berlin
Production build 0.71.5 2024