Problem/Motivation

When I try to install Patternkit on a standard profile Drupal 11.2 site, I get this error:

PHP Fatal error:  Trait "Drupal\layout_builder\LayoutEntityHelperTrait" not found in /var/www/web/modules/contrib/patternkit/src/LayoutHelper.php on line 26

Steps to reproduce

- Install Drupal 11.2 with the standard profile
- Try to enable Patternkit module
- Observe the error noted above?

Proposed resolution

Make Patternkit dependent on Layout Builder? Or somehow only load LB's traits conditionally, e.g., if LB is itself enabled?

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork patternkit-3541532

Command icon 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

krisahil created an issue. See original summary.

slucero made their first commit to this issue’s fork.

slucero credited minsharm.

slucero’s picture

Status: Active » Needs review
Parent issue: » #3542304: Patternkit 9.1.3 Release Plan

@krisahil, we had been looking at marking the Layotu Builder module as required already, so we'll move forward with your suggestion of doing so. I've uploaded an MR making this change.

minsharm’s picture

I tested this issue today and can see PK module is now dependent on Layout Builder, which is expected.

  • Installing the Patternkit module automatically installs the Layout Builder module as well.
  • Uninstalling the Layout Builder module indicates required by the Patternkit module if Patternkit is installed.

  • slucero committed ae58154b on 9.1.x
    [#3541532] Require the layout builder module.
    
slucero’s picture

Status: Needs review » Reviewed & tested by the community

Verified internally and ready for merge into 9.1.x.

slucero’s picture

Status: Reviewed & tested by the community » Fixed

Merged for inclusion in the 9.1.3 release (see #3542304: Patternkit 9.1.3 Release Plan).

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.