Problem/Motivation

Currently, it does not seem possible to enable layout builder for an existing content type via a recipe.
Using setThirdPartySettings on the default view display seems to have no effect.

This will be needed for Drupal CMS as we decided to use layout builder enabled view modes and even overrides.

Steps to reproduce

Try to create a recipe that sets up layout builder for the page content type

Proposed resolution

By marking some of the methods in LayoutBuilderEntityViewDisplay as action methods, this should become possible.

Issue fork drupal-3486981

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

l_vandamme created an issue. See original summary.

phenaproxima’s picture

Assigned: Unassigned » phenaproxima

LayoutBuilderEntityViewDisplay has three methods (enableLayoutBuilder, disableLayoutBuilder, and setOverridable) that should be exposed as config actions for this purpose. That's easy - three-line change, plus test coverage.

phenaproxima’s picture

Title: Allow recipes to enable layout builder » Allow recipes to enable Layout Builder via config actions
Component: recipe system » layout_builder.module
Issue tags: -Layout Builder, -Starshot blocker +Recipes initiative, +Drupal CMS stable release blocker

thejimbirch’s picture

This looks good, but tests are failing. I believe unrelated as this has no tests.

Speaking of which, does this need tests?

thejimbirch’s picture

I am unable to rerun the pipeline.

phenaproxima’s picture

Assigned: phenaproxima » Unassigned
Status: Needs work » Needs review
thejimbirch’s picture

Status: Needs review » Reviewed & tested by the community

Tests were added and Mr tests pass. Marking as rtbc.

alexpott’s picture

Version: 11.x-dev » 11.1.x-dev
Status: Reviewed & tested by the community » Fixed

Committed and pushed 524cf737ec1 to 11.x and 6d5a320db6c to 11.1.x. Thanks!

  • alexpott committed 6d5a320d on 11.1.x
    Issue #3486981 by phenaproxima, thejimbirch: Allow recipes to enable...

  • alexpott committed 524cf737 on 11.x
    Issue #3486981 by phenaproxima, thejimbirch: Allow recipes to enable...
thejimbirch’s picture

Needs change record and documentation issue follow up.

Thanks for the merge!

Status: Fixed » Closed (fixed)

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

thejimbirch’s picture