content_moderation support

Created on 21 October 2020, about 4 years ago
Updated 19 June 2024, 6 months ago

Problem

The logic that has been added to the RequireOnPublishValidator for the paragraph entities is not correct. Paragraph can't get the parent entity since it doesn't exist when a user creates a new node. Also, even on the node edit, when a node exists and the paragraph can extract the parent entity, it will get the original node rather than a new one and therefore it will contain the old 'Published' value.

Steps to reproduce

  • Create a paragraph type with the 'Require on publish' option enabled.
  • Add this paragraph to a node.
  • Create a new entity with an unchecked 'Publish' option.
  • Observe that 'Require on publish' validator returns an error for the required paragraph fields.

Proposed resolution

  1. Since at the moment, when a user submits the form validation constraint doesn't have the fresh node, we need or extract the published value from the POST data
  2. Skip the validation for the paragraph entities and when constraint function goes through all entity fields, find paragraphs fields, get paragraph entity and then go through all paragraph fields as well.
🐛 Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

🇺🇦Ukraine alt.dev

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

Merge Requests

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