function Drupal\Node\NodeForm::save() does not return a value

Created on 14 February 2022, over 2 years ago
Updated 21 June 2024, 2 days ago

Problem/Motivation

The submit function Drupal\Node\NodeForm::save() does not return a value. According to it's interface it should.
See https://api.drupal.org/api/drupal/core!modules!node!src!NodeForm.php/fun...

Steps to reproduce

Proposed resolution

Save the return code from `$node-save() and pass it back to the caller

Remaining tasks

Coding - add tests, that verify the behaviour

User interface changes

none

API changes

No changes - adjusting real behavior to documented API.

Data model changes

none

Release notes snippet

πŸ› Bug report
Status

Needs work

Version

11.0 πŸ”₯

Component
Node systemΒ  β†’

Last updated about 1 hour ago

No maintainer
Created by

πŸ‡©πŸ‡ͺGermany mmbk Meißen

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Status changed to Needs work over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    This issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request β†’ as a guide.

    This will need a test case showing the issue.

  • πŸ‡¨πŸ‡­Switzerland Berdir Switzerland

    This can't be tested because that return type is bogus. save() is used as a submit callback, submit callbacks have no return value. This was just copied from the Entity save method for no reason. We should instead remove the @return from \Drupal\Core\Entity\EntityFormInterface::save().

Production build 0.69.0 2024