View mode does not persist on validation errors

Created on 28 January 2025, 2 months ago

Problem/Motivation

I've separate view mode for preview, but same_page_preview hardcodes to "full" view mode on javascript https://git.drupalcode.org/project/same_page_preview/-/blob/2.1.x/js/sam...

Steps to reproduce

  1. Install Drupal 11.x and same_page_preview module
  2. Make some field required (eg. /admin/structure/types/manage/article/fields/node.article.field_tags)
  3. Create content (/node/add/article)
  4. Launch preview and select "teaser" view mode
  5. Edit text body area and make sure tags field is empty.
  6. Validation error is printed on FULL view mode

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

2.1

Component

Code

Created by

🇫🇮Finland sokru

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

Comments & Activities

Production build 0.71.5 2024