Additional unselected fields are split based on common field storage

Created on 7 July 2023, over 1 year ago
Updated 19 October 2023, about 1 year ago

Problem/Motivation

If you include a field storage that is common to multiple entity bundles in the split configuration, the other bundles' fields are exported and split even if they weren't selected. Not selecting the field storage won't let you import the (wanted) selected field, so I have to end up adding the field storage config manually.

Steps to reproduce

Create a field on a taxonomy vocabulary, then reuse it on another vocabulary. This will create 3 yml files:

  1. field.field.taxonomy_term.vocabulary_1.field_A
  2. field.field.taxonomy_term.vocabulary_2.field_A
  3. field.storage.taxonomy_term.field_A

Try to split one of the two vocabularies and put the config in a custom module's /config/install folder.
If you don't select field.storage.taxonomy_term.feeds_item, you can't enable the module because of unmet dependencies.
If you do, you will have config for the other unwanted vocabulary (that will probably even more unmet dependencies) in your split.

Proposed resolution

I don't understand why should this happen, hence I think it's a bug. Each field depends on the storage, but the field storage doesn't depend on both fields (at least it's not written in the yml)

Remaining tasks

User interface changes

API changes

Data model changes

๐Ÿ› Bug report
Status

Postponed: needs info

Version

2.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡นItaly kopeboy Milan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @kopeboy
  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany SerkanB

    Sounds a lot like this issue here just with fields instead of permissions:
    https://www.drupal.org/project/config_split/issues/3310931 ๐Ÿ› Role/Permission are added to multiple splits Fixed

    And there are probably other configurations where this happens. Anything that's shared between different entities/stuffโ„ข. It seems to be a difficult problem to solve.

  • Status changed to Postponed: needs info about 1 year ago
  • ๐Ÿ‡จ๐Ÿ‡ญSwitzerland bircher ๐Ÿ‡จ๐Ÿ‡ฟ

    Could this issue possibly be fixed by using the advanced feature called "stackable splits"?

Production build 0.71.5 2024