Problem/Motivation
On Drupal 11.3, when I run Drupal's cron job (e.g., "drush cron"), I get this error:
PHP Fatal error: Drupal\patternkit\Plugin\QueueWorker\LayoutQueueWorkerBase and Drupal\layout_builder\LayoutEntityHelperTrait define the same property ($sectionStorageManager) in the composition of Drupal\patternkit\Plugin\QueueWorker\LayoutQueueWorkerBase. However, the definition differs and is considered incompatible. Class was composed in /var/www/html/web/modules/contrib/patternkit/src/Plugin/QueueWorker/LayoutQueueWorkerBase.php on line 34
Steps to reproduce
- Install Drupal 11.3 with standard profile
- Add latest Patternkit 9.1.x (specifically commit 56d0f79)
- Enable patternkit module.
- Try to run cron (e.g., drush cron). Notice the above-mentioned error.
Proposed resolution
- See proposed MR.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 3578041-layout-queue-worker-base-trait-conflict.patch | 1.61 KB | slucero |
Issue fork patternkit-3578041
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
sluceroThanks @krisahil! This a quick fix to patch the Drupal 11 compatibility issue and will be very helpful. I'm uploading as a patch file for others to easily include as a composer patch as well before we get this merged in.
Apply with Composer (cweagans/composer-patches)
If your project uses composer-patches, add the following under the
extrasection ofcomposer.json:Comment #5
sluceroMerged for inclusion in the 9.1.3 release.
See #3542304: Patternkit 9.1.3 Release Plan.