Problem/Motivation
If paragraphs_library_update_8103 is run multiple times, the config key `dependencies.enforced.modules` contains multiple copies of `- paragraphs_library` under the enforced modules. These update functions normally don't run multiple times on a single site, but I have a multisite case where it did.
Steps to reproduce
- Run update on a site that needed the update.
- Import configuration on another site that needs to run the update.
- Run the update again
Proposed resolution
Add a check before adding module list to dependencies.
Perhaps add another update function to remove duplicate entries on sites?
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | prevent_duplicate_dependencies-3471069-5.patch | 869 bytes | lallen |
| #3 | prevent_duplicate_dependencies-3471069-3.patch | 761 bytes | lallen |
Issue fork paragraphs-3471069
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
lallen commentedPatch to prevent `paragraphs_library` from being duplicated in enforced module dependencies.
Comment #4
lallen commentedComment #5
lallen commentedReworked previous patch to add more defensive initialisation if config is new.
Comment #8
yashaswi18 commentedConverted the above patch into a merge request for easier review.