NodeFormController::form() sets $form['#submit'] to an empty array(), so FormBuilder doesn't automatically adds submitForm() as a form-level submit.

As the comment shows, that's a remnant of D7, when the auto-populated submit callback would have been node_form_submit(), which in fact was just the button-level submit callback for the "Save" button.

That's not needed anymore, the "Save" buttons have their own dedicated submit methods (submit() and unpublish() respectively), and it's just confusing that submitting the form runs validateForm() but not submitForm() (no biggie, since both happen to be empty for nodes)

CommentFileSizeAuthor
#1 NodeFormController-submit-2169875-1.patch894 bytesyched

Comments

yched’s picture

Status: Active » Needs review
StatusFileSize
new894 bytes

Patch

Status: Needs review » Needs work

The last submitted patch, 1: NodeFormController-submit-2169875-1.patch, failed testing.

The last submitted patch, 1: NodeFormController-submit-2169875-1.patch, failed testing.

yched’s picture

Status: Needs work » Needs review
tim.plunkett’s picture

Status: Needs review » Reviewed & tested by the community
webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.