Fatal error when adding component after force deleting JS code component config

Created on 3 December 2025, about 2 months ago

Overview

After placing a JS code component on a page, if you force-delete its config entity using Drush, subsequent attempts to add any component in the Canvas UI result in a fatal error:

An unexpected error has occurred while fetching the layout.
Error 500: assert($source instanceof ComponentSourceInterface)

This prevents further editing or use of the Canvas page after such a deletion.

Steps to Reproduce

  1. Place a JS code component on a page.
  2. Force-delete its config entity via Drush:

    drush config:delete xb_javascript_component.COMPONENT_ID
  3. Reload the page in the Canvas UI.
  4. Attempt to add any component to the page.
  5. Observe the error:

    An unexpected error has occurred while fetching the layout.
    Error 500: assert($source instanceof ComponentSourceInterface)
        

Proposed resolution

User interface changes

🐛 Bug report
Status

Active

Version

1.0

Component

… to be triaged

Created by

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.

No activities found.

Production build 0.71.5 2024