Problem/Motivation

If you have a project that contains config/modify folders and enable the module later then the module will immediately try to apply the changes in those folders. However, that is likely config that was already available through other paths (e.g. config updates) or requires future update hooks to be applied which can cause fatal errors.

Steps to reproduce

Proposed resolution

Add the config/modify files of all modules that are enabled when config_modify is enabled to the list of applied configs without applying them. This ensures that only files that are added (or enabled) after the config_modify module exists will be applied.

This means that if a module relies on using config_modify to make alterations to config it needs to add the module as a dependency so the config_modify module will be installed first.

We have the option to only register config as applied if its dependencies matches, but at the moment this may make things less predictable so we just register all the config as already being applied, requiring modules to have a proper install order to fix this issue.

Remaining tasks

User interface changes

API changes

Data model changes

Comments

Kingdutch created an issue. See original summary.

kingdutch’s picture

Assigned: kingdutch » Unassigned
Status: Active » Needs review
StatusFileSize
new871 bytes
kingdutch’s picture

StatusFileSize
new1.83 KB

The previous patch didn't actually fix the problem because we didn't fix our initial conditions.

Status: Needs review » Needs work
kingdutch’s picture

Status: Needs work » Needs review
StatusFileSize
new2.85 KB
new0 bytes

Need to slightly better control the install order.

kingdutch’s picture

StatusFileSize
new8.59 KB
new7.21 KB

This new version provides a Drush command to also fix the issue during update hooks.

kingdutch’s picture

StatusFileSize
new10.66 KB
new2.58 KB

This adds test coverage specifically for the install case.

  • Kingdutch committed 17a549fd on 1.0.x
    Issue #3357929 by Kingdutch: Installing config modify in an existing...
kingdutch’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.