Problem/Motivation

For instances where a distribution already specifies certain specific configuration for the trash settings' node bundles, on a clean install of the distribution/profile, the existing bundle settings are overridden to be an empty array.

One could argue that you shouldn't be targeting specific node bundles in the first place (I don't plan to, I just thought it was worth flagging).

Steps to reproduce

1. Have a Drupal profile that provides the following trash.settings config in its config/install folder:

enabled_entity_types:
  node: [basic_page]

2. When the trash module is installed, it overwrites the existing node entity settings to be an empty array, rather than only for the specific basic_page bundle.

Proposed resolution

Relax the modules_installed hook, so that it respects whatever the existing enabled_entity_types configuration was if it exists.

Remaining tasks

Provide MR/patch.

User interface changes

N/A

API changes

N/A

Issue fork trash-3584703

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

codebymikey created an issue. See original summary.

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

amateescu’s picture

Category: Task » Bug report
Status: Active » Needs review

Easy fix :)

  • amateescu committed 03ee3cec on 3.1.x
    fix: #3584703 Trash overwrites existing enabled_entity_types...

  • amateescu committed 9f1b1a81 on 3.x
    fix: #3584703 Trash overwrites existing enabled_entity_types...
amateescu’s picture

Status: Needs review » Fixed

Merged into 3.1.x and backported to 3.x, thanks for reporting it :)

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.