Overview

Thank you for Drupal and for the Drupal Community.

On a fresh Commerce Kickstart 5.x install on Drupal 11, simply enabling Canvas 1.0.0 with Layout Builder Expose All Field Blocks enabled produces multiple PHP warnings:

[warning] Undefined array key "default_formatter" FieldBlock.php:230

When the deprecated Layout Builder Expose All Field Blocks module is uninstalled on the same site, these warnings go away.

Steps to reproduce (fresh site)

1. Create a new Commerce Kickstart project:

composer create-project centarro/commerce-kickstart-project kickstart-canvas-test
cd kickstart-canvas-test

2. Configure DDEV (or any local stack) for Drupal:

ddev config --project-type=drupal11 --docroot=web --project-name=kickstart-canvas-test
ddev start

3. Install Drupal/Commerce Kickstart via the browser:

Visit https://kickstart-canvas-test.ddev.site
Go through the install wizard with default options (including demo content / shipping recipes).
Log in as admin.

4. Add Canvas 1.0.0:

ddev composer require drupal/canvas:1.0.0 --with-all-dependencies

5. Enable Canvas:
ddev drush en canvas -y

Actual result (with Layout Builder Expose All Field Blocks enabled)

When running step 5:

Drush prints multiple command line warnings like:

[warning] Undefined array key "default_formatter" FieldBlock.php:230
[warning] Undefined array key "default_formatter" FieldBlock.php:230
...
[success] Module canvas has been installed. (Permissions - Configure)

On subsequent ddev drush cr runs (with Canvas still enabled), I also see repeated:

[warning] Undefined array key "default_formatter" FieldBlock.php:230

on the command line.

BUT, if I uninstall Layout Builder Expose All Field Blocks (Deprecated), the command line warnings do not appear anymore after rebuilding cache.

Proposed resolution

User interface changes

Comments

luckydad created an issue.