Component-Extensions - Ensure the initial activation list matches #26499
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Fixes a regression from #26036 (merged circa
5.63-dev
) where old-style installation procedures may produce inconsistent data.This problem was introduced by 5.63, but it became symptomatic in 5.64 because #26208 makes the system reliant on the extension-data.
Steps to Reproduce
Perform an installation using any of the old-style installation routines, such as:
setup.sh
drush civicrm-install
civicrm.mysql
,civicrm_data.mysql
, or similarFor example, I used this procedure:
Note: For newer install procedures (
civicrm-setup
), it seems to be OK (*based on very cursory testing ofcv core:install
andcivibuild reinstall
), but I haven't stress-tested. I expect these commands worked becausecivicrm-setup
has additional logic for initializing components+extensions.Before
After installation, the list of "Components" and "Extensions" is out-of-sync.
After
After installation, the list of "Components" and "Extensions" match.
Technical Details
There is a structural asymmetry - when dealing with an empty/default dataset, "settings"/"components" will inherit a default activation-list; but "extensions" start with an empty activation-list. You must have a record to show the extension as active.
This patch makes the live-setting-default (for
enable_components
) and the stored default (forcivicrm_extension
) match. To ensure that they continue matching, they will need to be updated in tandem. I added comments to both sides to point this out.