500 Error and delete option disabled for code component after Canvas/library/usage changes

Created on 6 October 2025, about 1 month ago

Overview

Scenario 1: 500 Error on Component Form

A 500 Error appears on the right-hand side section when interacting with a custom code component after removing it from the library on another page.

Error message:

An unexpected error has occurred while rendering the component's form.<br>
Error 500: Argument 3 ($client_model) must be of type array, null given, called in /var/www/html/web/modules/contrib/canvas/src/Form/ComponentInstanceForm.php on line 130

Steps to Reproduce:

  1. Add custom code component to the page.
  2. Create another page and remove component from library.
  3. Go back to previous page, and click on component on canvas.

Scenario 2: Delete Option Remains Disabled

After removing all usages and deleting the component from canvas, the delete option for the code component should become enabled.

User should be able to delete the code component entirely if it is no longer in use.

But in this case, Delete option is still disabled.

Steps to Reproduce:

  1. Add custom code component to the canvas.
  2. Go to another page, remove component from library.
  3. Go to previous page and delete component from canvas and publish the changes.
  4. Try to delete code component from Code section.

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