Diff plugins should update after fields are removed

Created on 18 December 2018, almost 6 years ago
Updated 31 May 2024, 6 months ago

When I export site configuration, I get the file diff.plugins.yml. It contains a lot of entries like this:

    field_foo:
      type: core_field_diff_builder
      settings:
        show_header: 1
        markdown: drupal_html_to_text

If I decide to remove field_foo, then I would expect the corresponding entry to be removed, but it is not.

Maybe the diff.plugins config item is supposed to depend on the config for all those fields.

🐛 Bug report
Status

Needs work

Component

Code

Created by

🇺🇸United States benjifisher Boston area

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇫🇮Finland Tuuuukka

    Could this work? It clears the deleted field's config from config/sync/diff.plugins.yml when the field is deleted.

    To test:

    1. Add a new field to e.g. a content type.
    2. Run drush cex and make sure you see the field in config/sync/diff.plugins.yml.
    3. Delete the field.
    4. Run drush cex again and make sure the field's not there anymore.

  • Status changed to Needs review 12 months ago
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.3 & MySQL 5.7
    last update 12 months ago
    39 pass
  • Status changed to RTBC 12 months ago
  • 🇫🇮Finland Onnia

    I tested this patch with vanilla D10.1 this seems works as Tuuuukka reported. In some setups the diff.plugin.yml config changes are exported only after saving the /admin/config/content/diff/fields form but I guess this is the way the diff configs are updated / detected. After saving the settings form the patch works as expected.

  • Status changed to Needs work 6 months ago
  • 🇦🇺Australia acbramley

    Thank you for your contribution. This issue currently does not meet the Contribution guidelines which are required to get this change committed.

Production build 0.71.5 2024