Steps to reproduce

Related issue is #3493082: SDC does not respect JSON Schema validation.

  1. Create a component that is using the defaultkey.
    Example:
    name: Layout 3 Column
    status: stable
    group: Layouts
    props:
      type: object
      properties:
        attributes:
          type: Drupal\Core\Template\Attribute
        container_size:
          title: Container size
          type: string
          enum:
            - narrow
            - wide
          default: wide
  2. This component will not work due to #3493082: SDC does not respect JSON Schema validation. However, it breaks the display of all other components. The editor will see this error:
  3. An invalid component should not break everything. Instead, it should show up as disabled at /admin/structure/component/status

Proposed resolution

User interface changes

CommentFileSizeAuthor
image (1).png49.83 KBmherchel

Comments

mherchel created an issue. See original summary.

mherchel’s picture

Another situation that I ran into is if an image component has an invalid examples.

wim leers’s picture

#3507641: Allow components containing non-required images and no examples to be placed will do this, and will indeed result in

  1. An invalid component should not break everything. Instead, it should show up as disabled at /admin/structure/component/status

Crediting you over there!