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

  1. Run update on a site that needed the update.
  2. Import configuration on another site that needs to run the update.
  3. 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

Issue fork paragraphs-3471069

Command icon 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

dasginganinja created an issue. See original summary.

lallen’s picture

Patch to prevent `paragraphs_library` from being duplicated in enforced module dependencies.

lallen’s picture

Status: Active » Needs review
lallen’s picture

Reworked previous patch to add more defensive initialisation if config is new.

yashaswi18 made their first commit to this issue’s fork.

yashaswi18’s picture

Converted the above patch into a merge request for easier review.