Document reason for special handling of system.site uuid

Created on 7 October 2022, over 2 years ago
Updated 14 August 2023, almost 2 years ago

Problem/Motivation

In looking through the code, it's not clear why \Drupal\config_enforce\ConfigEnforcer::generateHashFromActiveConfig() and \Drupal\config_enforce\ConfigImporter::handleSpecialCaseConfig() single out the system.site configuration to preserve the uuid.

Steps to reproduce

Apply eyeballs to code.

Proposed resolution

Document the reasoning in the code as comments/docblock.

After some poking and prodding an a bit of serendipity, it looks like Drupal core uses this specific config's uuid as a proxy for detecting whether the entirety of the config sync directory is from the current site (or a clone of it) or from a different site. If the config has a different uuid, core refuses to import the config and shows a message that the config is not from the current site or a clone of it.

It looks like this was added as part of #3175060: [meta] Refactor internals in commit 707e6736 by @ergonlogic .

Remaining tasks

Add documentation to code.

User interface changes

API changes

None.

Data model changes

None.

📌 Task
Status

Active

Version

1.0

Component

Documentation

Created by

🇨🇦Canada ambient.impact Toronto

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.

Production build 0.71.5 2024