With content moderation, layout builder is no longer validated

Created on 20 May 2022, over 2 years ago
Updated 8 February 2023, almost 2 years ago

Problem/Motivation

When content moderation is enabled, it is possible to publish from the layout builder page. Starting with the 8.x-1.3 release of this module, publishing from layout builder no longer validates "required on publish" fields. It worked in 8.x-1.2. This seems to stem from this commit: https://git.drupalcode.org/project/require_on_publish/-/commit/fca4dce0d....

Steps to reproduce

Enable content moderation and layout builder modules, along with this module.

In a content type, set one field to 'required on publish', and in manage display set it to use layout builder and allow each content item to have its layout customized.

In workflows, assign a workflow to this content type.

Create a node without publishing it, leaving the 'required on publish' field blank.

Go Layout tab of this node, select 'Published', click 'Save layout'. This node can be published even if the field with 'Required on Publish' is empty.

Proposed resolution

Make it work.

Remaining tasks

Create a patch to make it work without undoing the reason for the commit that broke it. I have one in progress that I will attach soon.

User interface changes

None

API changes

None

Data model changes

None

🐛 Bug report
Status

Needs review

Component

Code

Created by

🇨🇦Canada lily.yan

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024