ContentEntityForm::validateForm() pointlessly returns $entity

Created on 13 March 2021, almost 4 years ago
Updated 27 April 2023, over 1 year ago

API page: https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Entity%21...

ContentEntityForm::validateForm() returns $entity.

But the parent definition doesn't return anything. And nothing in the Entity system calls validateForm(); FormAPI calls it. So the returned entity has no effect.

It should be removed, as it's just confusing having it there.

📌 Task
Status

Needs work

Version

10.1

Component
Entity 

Last updated 29 minutes ago

Created by

🇬🇧United Kingdom joachim

Live updates comments and jobs are added and updated live.
  • Novice

    It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

  • Needs subsystem maintainer review

    It is used to alert the maintainer(s) of a particular core subsystem that an issue significantly impacts their subsystem, and their signoff is needed (see the governance policy draft for more information). Also, if you use this tag, make sure the issue component is set to the correct subsystem. If an issue significantly impacts more than one subsystem, use needs framework manager review instead.

  • GiftofOpenSource

    Take part in Pantheon's 2021 Gift of Open Source - all contributions and expertise levels welcome!

  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

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.

  • The Needs Review Queue Bot tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

    Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.

    Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

  • Status changed to Needs review almost 2 years ago
  • Status changed to Needs work almost 2 years ago
  • The Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

    Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.

    Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

  • 🇮🇳India Nitin shrivastava

    try to fix ccf error

  • 🇮🇳India sahil.goyal

    Update the patch to resolve error in #22 there is some assertion fail error thrown as some gin theme added so i have reverted it back.

  • Open in Jenkins → Open on Drupal.org →
    Environment: PHP 8.1 & MySQL 5.7
    last update over 1 year ago
    Custom Commands Failed
  • 🇮🇳India sahil.goyal

    sorry, whitespace need to be fixed.

  • Open in Jenkins → Open on Drupal.org →
    Environment: PHP 8.1 & MySQL 5.7
    last update over 1 year ago
    Build Successful
  • Status changed to RTBC over 1 year ago
  • 🇧🇷Brazil elber Brazil

    Hi patch applied cleanly.
    Whitespace wasn't encountered.
    Test is passing.
    I'm using drupal10.1 version
    It sounds good to me.

  • last update over 1 year ago
    29,216 pass, 1 fail
  • Status changed to Needs work over 1 year ago
  • 🇳🇿New Zealand danielveza Brisbane, AU
    1. +++ b/core/lib/Drupal/Core/Entity/ContentEntityForm.php
      @@ -215,9 +215,8 @@ public function validateForm(array &$form, FormStateInterface $form_state) {
      -    $form_state->setTemporaryValue('entity_validated', TRUE);
      

      I don't think we should be removing this

    2. +++ b/core/lib/Drupal/Core/Entity/ContentEntityForm.php
      @@ -215,9 +215,8 @@ public function validateForm(array &$form, FormStateInterface $form_state) {
      +    return $form_state;
      

      I'm a little confused, wasn't the goal to remove the return from this?

    Also still needs a subsystem review, and tests haven't run on the last few patches

  • Status changed to Needs review over 1 year ago
  • Open in Jenkins → Open on Drupal.org →
    Environment: PHP 8.1 & MySQL 5.7
    last update over 1 year ago
    Custom Commands Failed
  • 🇮🇳India Vidushi Mehta

    Addressing #26

  • Status changed to Needs work over 1 year ago
  • 🇺🇸United States smustgrave

    Removing credit for #20 and #27 as you should check your patch before uploading. Also all patches should be uploaded with an interdiff.

    IS could use some love as the patches seem to be go all over the place and should be documented what's being addressed.

  • 🇮🇳India Vidushi Mehta

    Apologies for not putting the interdiff @smustgrave and thanks for letting us know how to work better this is the way we will improve and help the community in a better way.

Production build 0.71.5 2024