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
Add MR
User interface changes
No
API changes
No
Data model changes
No
| Comment | File | Size | Author |
|---|
Issue fork drupal-3450792
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3450792
changes, plain diff MR !8226
Comments
Comment #2
msnassar commentedComment #3
msnassar commentedComment #5
msnassar commentedComment #6
smustgrave commentedIssue summary appears to be missing some sections if those could be filled in please. Specifically proposed solution.
MR should be against 11.x not 11.0.x also
Comment #7
msnassar commentedComment #8
msnassar commentedComment #9
msnassar commentedComment #10
smustgrave commentedThanks
Change seems small enough I don't think it needs a test under the new policy.
Comment #11
quietone commented@msnassar, thanks for making the MR.
Nice to see an issue referring to the updated section of the Testing core gate. But this should still have an explanation as to why tests are not needed. I know that the size of the change is not in the heuristics. So, what is there that supports no tests?
Comment #12
acbramley commentedI'm also curious, does this actually have any end user effect?
Comment #13
acbramley commentedI would say this falls into this: "usually only for trivial bugs where testing would be convoluted" from that section.
To test this we would need to setup a content type with the field disabled, build the form, and check the array key doesn't exist. I don't think it's worth the hassle or overhead.
Comment #14
smustgrave commentedThanks @acbramley!
Comment #15
longwaveBackported down to 10.6.x as an eligible bug fix.
Committed and pushed f2ee3e47285 to main and 6d2e5f4b4c1 to 11.x and 8a115bd5759 to 11.3.x and dcc6b0e7b34 to 10.6.x. Thanks!