plugin ThreeColumnsLayout not always known to classloader

Created on 6 October 2024, about 1 month ago

Problem/Motivation

In certain circumstances plugin 'Drupal\civictheme\Plugin\Layout\ThreeColumnsLayout' is not known to the classloader and causes issues in LayoutBuilder config.

Steps to reproduce

Have 'PHP APCu caching' disabled on the server (yes, I know it's highly recommended - that's different from required).
Go to any layoutbuilder, try to 'Add section' and choose the 'Three columns' layout: it will fail and there will a failure and a 'Oops, something went wrong. Check your browser's developer console for more details.' message.
Message log shows a failure to load 'Drupal\civictheme\Plugin\Layout\ThreeColumnsLayout'.

In my setup Composer's classloader, at this point, does not have any theme paths in its 'prefixDirsPsr4'.

Proposed resolution

Not sure whether this is an issue for Civictheme or Layout Builder.
Somewhere in the call chain there may have to be the following

\Drupal::service('theme_handler')->listInfo();

to make sure that the theme code paths are available.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.8

Component

Code

Created by

🇬🇧United Kingdom mwjansen Bristol

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

Comments & Activities

Production build 0.71.5 2024