Avoid incrementing the scheduler field group on node previews

Created on 16 February 2024, about 1 year ago
Updated 21 March 2024, 12 months ago

Problem/Motivation

#2916730: Scheduler fields displayed in Media Library upload form when media is not enabled for scheduling introduced a change which generates a dynamic field group ID statically based on how many times the form is called.

However, when coming back from a node preview page, the ID of the scheduler form is erroneously incremented twice skipping straight to , which can break integrations such as scheduler_content_moderation_integration which expect the scheduler_settings field group to exist.

Steps to reproduce

Enable scheduler on a piece of node.
Create a piece of content, preview it, then go back to the editor through the link at the top of the page.
The id of the group is now edit-scheduler-settings-2, rather than the original/expected edit-scheduler-settings

Proposed resolution

Add in logic which maintains the said field group ID on returning from a node preview.

Remaining tasks

Provide issue fork/patch.

User interface changes

N/A

📌 Task
Status

Needs review

Version

2.0

Component

Code

Created by

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