config_import issue with layout builder for partial split for removed component.

Created on 1 June 2023, over 1 year ago
Updated 3 August 2023, over 1 year ago


Partial split error for link-builder component which removed.

First add component using link-builder in main default display view then remove some component for other site using partial split.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Postponed: needs info

Version

2.0

Component

Code

Created by

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

Comments & Activities

  • Issue created by @sundersingh18
  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

    This is thrown by \Drupal\layout_builder\SectionComponent::getPluginId(). Looks like invalid configuration indeed.

  • 🇨🇭Switzerland bircher 🇨🇿

    This would greatly benefit from a failing test. Or the very least a much better issue description with actual config examples that would help to debug this.

    In particular I would like to have a scenario where I can attach xdebug and check what $type, $path and other variables are for the components. Because it seems like it keeps the component empty, but components is a sequence. and for sequences it shouldn't keep the empty array. But this is something that would be much easier to debug with a test that creates this scenario.

  • Main File - core.entity_form_display.node.contact.default.yml

    uuid: ac517f68-8985-4fd5-a77b-c69996313b99
    langcode: en
    status: true
    dependencies:
      config:
        - entity_browser.browser.media_entity_browser
        - field.field.node.contact.field_add_skills
        - field.field.node.contact.field_back_url
        - field.field.node.contact.field_cmp_bio
        - field.field.node.contact.field_cmp_company
        - field.field.node.contact.field_cmp_email
        - field.field.node.contact.field_cmp_full_name
        - field.field.node.contact.field_cmp_image
        - field.field.node.contact.field_cmp_job_position
        - field.field.node.contact.field_cmp_job_title
        - field.field.node.contact.field_cmp_phone_number
        - field.field.node.contact.field_contact_description
        - field.field.node.contact.field_content_group
        - field.field.node.contact.field_content_owner
        - field.field.node.contact.field_eyebrow
        - field.field.node.contact.field_linkedin_url
        - field.field.node.contact.field_meta_tags
        - field.field.node.contact.field_parent_categories
        - field.field.node.contact.field_requires_full_bio_page
        - field.field.node.contact.field_search_tags
        - field.field.node.contact.field_yoast_seo
        - field.field.node.contact.layout_builder__layout
        - node.type.contact
      module:
        - advanced_text_formatter
        - entity_browser
        - field_group
        - layout_builder_at
        - link
        - maxlength
        - metatag
        - path
        - telephone
        - text
        - yoast_seo
    third_party_settings:
      field_group:
        group_general:
          children:
            - field_cmp_full_name
            - field_cmp_company
            - field_cmp_job_position
            - field_cmp_job_title
            - field_cmp_email
            - field_cmp_phone_number
            - field_eyebrow
            - field_parent_categories
            - field_requires_full_bio_page
            - field_contact_description
            - field_cmp_bio
            - field_linkedin_url
          label: GENERAL
          region: content
          parent_name: ''
          weight: 0
          format_type: details
          format_settings:
            classes: ''
            id: ''
            open: false
            description: ''
            required_fields: true
        group_skills:
          children:
            - field_add_skills
          label: SKILLS
          region: content
          parent_name: ''
          weight: 1
          format_type: tab
          format_settings:
            classes: ''
            id: ''
            formatter: closed
            description: ''
            required_fields: true
        group_c:
          children:
            - field_content_owner
            - field_content_group
            - field_search_tags
          label: 'Content & Search Tags'
          region: content
          parent_name: ''
          weight: 9
          format_type: details
          format_settings:
            classes: ''
            id: ''
            open: false
            description: ''
            required_fields: true
    id: node.contact.default
    targetEntityType: node
    bundle: contact
    mode: default
    content:
      field_add_skills:
        type: string_textfield
        weight: 2
        region: content
        settings:
          size: 60
          placeholder: ''
        third_party_settings: {  }
      field_back_url:
        type: link_default
        weight: 8
        region: content
        settings:
          placeholder_url: ''
          placeholder_title: ''
        third_party_settings: {  }
      field_cmp_bio:
        type: text_textarea
        weight: 11
        region: content
        settings:
          rows: 5
          placeholder: ''
        third_party_settings:
          maxlength:
            maxlength_js: null
            maxlength_js_label: 'Content limited to @limit characters, remaining: <strong>@remaining</strong>'
            maxlength_js_enforce: false
            maxlength_js_truncate_html: false
          advanced_text_formatter:
            show_token_tree: 0
      field_cmp_company:
        type: string_textfield
        weight: 2
        region: content
        settings:
          size: 60
          placeholder: ''
        third_party_settings: {  }
      field_cmp_email:
        type: email_default
        weight: 5
        region: content
        settings:
          placeholder: ''
          size: 60
        third_party_settings: {  }
      field_cmp_full_name:
        type: string_textfield
        weight: 1
        region: content
        settings:
          size: 60
          placeholder: ''
        third_party_settings: {  }
      field_cmp_image:
        type: entity_browser_entity_reference
        weight: 2
        region: content
        settings:
          entity_browser: media_entity_browser
          field_widget_display: rendered_entity
          field_widget_edit: false
          field_widget_remove: true
          field_widget_replace: false
          open: true
          field_widget_display_settings:
            view_mode: thumbnail
          selection_mode: selection_append
        third_party_settings: {  }
      field_cmp_job_position:
        type: options_select
        weight: 3
        region: content
        settings: {  }
        third_party_settings: {  }
      field_cmp_job_title:
        type: string_textfield
        weight: 4
        region: content
        settings:
          size: 60
          placeholder: ''
        third_party_settings: {  }
      field_cmp_phone_number:
        type: telephone_default
        weight: 6
        region: content
        settings:
          placeholder: ''
        third_party_settings: {  }
      field_contact_description:
        type: string_textarea
        weight: 10
        region: content
        settings:
          rows: 5
          placeholder: ''
        third_party_settings:
          maxlength:
            maxlength_js: 280
            maxlength_js_label: 'Content limited to @limit characters, remaining: <strong>@remaining</strong>'
            maxlength_js_enforce: false
            maxlength_js_truncate_html: false
          advanced_text_formatter:
            show_token_tree: 0
      field_content_group:
        type: options_select
        weight: 17
        region: content
        settings: {  }
        third_party_settings: {  }
      field_content_owner:
        type: options_select
        weight: 16
        region: content
        settings: {  }
        third_party_settings: {  }
      field_eyebrow:
        type: string_textfield
        weight: 7
        region: content
        settings:
          size: 60
          placeholder: ''
        third_party_settings: {  }
      field_linkedin_url:
        type: string_textfield
        weight: 12
        region: content
        settings:
          size: 60
          placeholder: ''
        third_party_settings: {  }
      field_meta_tags:
        type: metatag_firehose
        weight: 3
        region: content
        settings:
          sidebar: true
          use_details: true
        third_party_settings: {  }
      field_parent_categories:
        type: entity_reference_autocomplete
        weight: 8
        region: content
        settings:
          match_operator: CONTAINS
          match_limit: 10
          size: 60
          placeholder: ''
        third_party_settings: {  }
      field_requires_full_bio_page:
        type: boolean_checkbox
        weight: 9
        region: content
        settings:
          display_label: true
        third_party_settings: {  }
      field_search_tags:
        type: options_select
        weight: 18
        region: content
        settings: {  }
        third_party_settings: {  }
      field_yoast_seo:
        type: yoast_seo_widget
        weight: 4
        region: content
        settings:
          body: field_cmp_bio
        third_party_settings: {  }
      langcode:
        type: language_select
        weight: 10
        region: content
        settings:
          include_locked: true
        third_party_settings: {  }
      layout_builder__layout:
        type: layout_builder_at_copy
        weight: 12
        region: content
        settings:
          appearance: checked_hidden
        third_party_settings: {  }
      path:
        type: path
        weight: 6
        region: content
        settings: {  }
        third_party_settings: {  }
      simple_sitemap:
        weight: 11
        region: content
        settings: {  }
        third_party_settings: {  }
      status:
        type: boolean_checkbox
        weight: 7
        region: content
        settings:
          display_label: true
        third_party_settings: {  }
      title:
        type: string_textfield
        weight: 14
        region: content
        settings:
          size: 60
          placeholder: ''
        third_party_settings: {  }
      translation:
        weight: 13
        region: content
        settings: {  }
        third_party_settings: {  }
      url_redirects:
        weight: 5
        region: content
        settings: {  }
        third_party_settings: {  }
    hidden:
      created: true
      promote: true
      sticky: true
      uid: true
    
    

    Partial Split - config_split.patch.core.entity_view_display.node.contact.default.yml

    adding:
      third_party_settings:
        layout_builder:
          sections:
            -
              components:
                1fa7cda7-a090-4444-8833-968765e7d412:
                  weight: 0
                10cfe71b-b66a-4c87-928b-8ff5d439f577:
                  weight: 1
                2a51bd12-a1fb-4499-8683-9a4d80dfb960:
                  weight: 3
                45980bef-0f4f-45d5-ae77-3560c94798c5:
                  uuid: 45980bef-0f4f-45d5-ae77-3560c94798c5
                  region: second
                  configuration:
                    id: 'field_block:node:contact:field_cmp_email'
                    label: Email
                    label_display: '0'
                    provider: layout_builder
                    context_mapping:
                      entity: layout_builder.entity
                      view_mode: view_mode
                    formatter:
                      type: email_mailto
                      label: hidden
                      settings: {  }
                      third_party_settings: {  }
                  weight: 2
                  additional: {  }
        layout_builder_restrictions:
          entity_view_mode_restriction:
            allowed_blocks:
              'BH Blocks': {  }
              Content:
                - 'entity_field:node:field_cmp_bio'
                - 'entity_field:node:field_cmp_full_name'
                - 'entity_field:node:field_cmp_image'
                - 'entity_field:node:field_cmp_job_title'
              'Content fields':
                - 'field_block:node:contact:field_cmp_email'
              'Custom block types': {  }
              'Custom blocks':
                - 'block_content:1c15f22e-4ec9-4971-9738-589599ff2771'
                - 'block_content:d7041f90-28f2-423d-82fd-8d18c2bdda57'
              Devel: {  }
              'Entity Browser':
                - 'entity_browser_block:breakout_banner_browser'
              Forms: {  }
              Help: {  }
              'Inline blocks': {  }
              'Lists (Views)': {  }
              Menus: {  }
              'Responsive Preview': {  }
              System: {  }
              User: {  }
              'User fields': {  }
              core: {  }
      hidden:
        field_add_skills: true
        field_back_url: true
        field_contact_description: true
        field_eyebrow: true
        field_linkedin_url: true
        field_parent_categories: true
        field_requires_full_bio_page: true
        field_search_tags: true
    removing:
      dependencies:
        config:
          - field.field.node.contact.field_add_skills
          - field.field.node.contact.field_back_url
          - field.field.node.contact.field_contact_description
          - field.field.node.contact.field_content_group
          - field.field.node.contact.field_content_owner
          - field.field.node.contact.field_eyebrow
          - field.field.node.contact.field_linkedin_url
          - field.field.node.contact.field_parent_categories
          - field.field.node.contact.field_requires_full_bio_page
          - field.field.node.contact.field_search_tags
        module:
          - link
      third_party_settings:
        layout_builder:
          sections:
            -
              layout_settings:
                context_mapping: {  }
              components:
                1fa7cda7-a090-4444-8833-968765e7d412:
                  weight: -10
                10cfe71b-b66a-4c87-928b-8ff5d439f577:
                  weight: -8
                2a51bd12-a1fb-4499-8683-9a4d80dfb960:
                  weight: -7
                f04740cc-289e-44ba-b04e-0311c3c82660:
                  uuid: f04740cc-289e-44ba-b04e-0311c3c82660
                  region: first
                  configuration:
                    id: 'field_block:node:contact:field_add_skills'
                    label_display: '0'
                    context_mapping:
                      entity: layout_builder.entity
                    formatter:
                      type: string
                      label: above
                      settings:
                        link_to_entity: false
                      third_party_settings: {  }
                  weight: 1
                  additional: {  }
                5885bd10-a18a-4a62-93e7-3ebbb67a055b:
                  uuid: 5885bd10-a18a-4a62-93e7-3ebbb67a055b
                  region: first
                  configuration:
                    id: 'field_block:node:contact:field_search_tags'
                    label_display: '0'
                    context_mapping:
                      entity: layout_builder.entity
                    formatter:
                      type: entity_reference_label
                      label: above
                      settings:
                        link: true
                      third_party_settings: {  }
                  weight: 2
                  additional: {  }
                083e1cfe-6c12-4cfb-977e-6d142fe35d7a:
                  uuid: 083e1cfe-6c12-4cfb-977e-6d142fe35d7a
                  region: second
                  configuration:
                    id: 'field_block:node:contact:field_linkedin_url'
                    label: 'LinkedIn Url'
                    label_display: '0'
                    provider: layout_builder
                    context_mapping:
                      entity: layout_builder.entity
                      view_mode: view_mode
                    formatter:
                      type: string
                      label: above
                      settings:
                        link_to_entity: false
                      third_party_settings: {  }
                  weight: -9
                  additional: {  }
        layout_builder_restrictions:
          entity_view_mode_restriction:
            restricted_categories: {  }
          allowed_block_categories: {  }
      content:
        field_add_skills:
          type: string
          label: above
          settings:
            link_to_entity: false
          third_party_settings: {  }
          weight: 14
          region: first
        field_back_url:
          type: link
          label: above
          settings:
            trim_length: 80
            url_only: false
            url_plain: false
            rel: ''
            target: ''
          third_party_settings: {  }
          weight: 12
          region: first
        field_contact_description:
          type: basic_string
          label: above
          settings: {  }
          third_party_settings: {  }
          weight: 10
          region: first
        field_eyebrow:
          type: string
          label: above
          settings:
            link_to_entity: false
          third_party_settings: {  }
          weight: 11
          region: first
        field_linkedin_url:
          type: string
          label: above
          settings:
            link_to_entity: false
          third_party_settings: {  }
          weight: 16
          region: first
        field_parent_categories:
          type: entity_reference_label
          label: above
          settings:
            link: true
          third_party_settings: {  }
          weight: 13
          region: first
        field_requires_full_bio_page:
          type: boolean
          label: above
          settings:
            format: default
            format_custom_false: ''
            format_custom_true: ''
          third_party_settings: {  }
          weight: 9
          region: first
        field_search_tags:
          type: entity_reference_label
          label: above
          settings:
            link: true
          third_party_settings: {  }
          weight: 15
          region: first
      hidden:
        search_api_excerpt: true
    
    
  • Status changed to Postponed: needs info over 1 year ago
  • 🇨🇭Switzerland bircher 🇨🇿

    I would appreciate a failing test to debiug this and come up with a solution.
    Or if you can not create a scenario in a test, please re-create this problem with the demo umami profile and paste here the whole split config which produces this issue.

    1. Install demo umami on the latest version of Drupal core
    2. install Config Split
    3. Create a split which behaves like the problem described in this issue.
    4. Attach the split config to a comment
    5. Describe in the comment what actions lead to the problem
      (for example:
      1. export the config
      2. turn split off
      3. import config without split
      4. turn split on again
      5. import config with the split

      )

    6. If you need to do anything else for this problem to manifest, please describe that too.
Production build 0.71.5 2024