Publish checks validation constraints, but not form validation

Created on 29 April 2025, 13 days ago

Overview

The ability to surface validation errors to the UI when publishing entity changes was added in πŸ“Œ [Needs design] Display validation errors in page data form Active throughout the review process, and even after, there was a reasonable assumption that the publish process would be performing the same validation that would occur if the entity were being edited with a classic node/[nid]/edit form.

However, \Drupal\experience_builder\Controller\ApiAutoSaveController::post only checks validation constraints, and these do not account for everything available via form validation (such as validation provided in \Drupal\Core\Form\FormInterface::validateForm). Even if core were to provide parity, contrib would be a concern

Proposed resolution

Before anything else, determine if we should incorporate form validation into the publish process. There are some valid arguments against doing it, but it would be at odds with how even experienced Drupalists are expecting/assuming it should work and that's a very relevant factor even if it isn't a technical one.

User interface changes

πŸ“Œ Task
Status

Active

Version

0.0

Component

Miscellaneous

Created by

πŸ‡ΊπŸ‡ΈUnited States bnjmnm Ann Arbor, MI

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024