Only set #group is status field exists in NodeForm

Created on 30 May 2024, 7 months ago
Updated 13 June 2024, 6 months ago

Problem/Motivation

In core/modules/node/src/NodeForm.php
$form['status']['#group'] = 'footer';
That has been introduced in: #2068063: Change "Save and keep un-/published" buttons to a "Published" checkbox and an included "Save" button β†’
is setting #group for the status field regardless whether the field is exist or not.

Steps to reproduce

- Go to manage form display for a content type.
- Move status field to "Disabled" section,
- Debug/Dump the form.
You see:

  "status" => array:1 [β–Ό
    "#group" => "footer"
  ]

Proposed resolution

Set #group for status field if it is exist.

Remaining tasks

User interface changes

No

API changes

No

Data model changes

No

πŸ› Bug report
Status

Needs work

Version

11.0 πŸ”₯

Component
Node systemΒ  β†’

Last updated 4 days ago

No maintainer
Created by

πŸ‡§πŸ‡ͺBelgium msnassar

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