Review 10.4 Merged

70135[BUGFIX] Skip range validation if input value and default are both "0"

Benni Mack CR +2 V +2 Normal +63 −1 updated 07/29/21, 19:03

Commit message

This patch fixes a regression originally introduced in #94103. The
problem there was simply an erroneous strict comparison, which further
got completely removed in #94527 due to a misconception.

The mentioned condition is important for date type fields with a lower
range set in TCA. If the user doesn't provide a value for that date
field, the range validation should be skipped. Otherwise this empty
value would always be interpreted as 0, resulting the validation to
change it to the lower range value.

As this is a special case, the condition was extracted and rewritten,
to only apply for this exact scenario. Other than that the validation
should not be skipped.

A unit test is added to ensure this behavior can't break anymore.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Nikita Hovratov +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Nikita Hovratov +1
    • core-ci +1 CI

Issues 3

Files 2

Review log 1014

  1. Benni Mack commented on patch set 1 07/29/21, 15:27

    Cherry Picked from branch master. The following files contain Git conflicts: * typo3/sysext/core/Tests/Acceptance/Backend/FormEngine/ElementsBasicInputDateCest.php
  2. core-ci voted on patch set 1 V -1 07/29/21, 15:28 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/13885

  3. Benni Mack commented on patch set 2 07/29/21, 15:29

    Published edit on patch set 1.
  4. Benni Mack marked it ready for review 07/29/21, 15:29

  5. Christian Kuhn commented on patch set 2 CR -1 07/29/21, 15:36

    ElementsBasicInputDateCest.php:141 Unresolved

    this will fail since styleguide does not have that field in v10. please just skip that ac test change in v10 version (reset file change).
  6. core-ci voted on patch set 2 V -1 07/29/21, 15:40 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/13887

  7. Benni Mack commented on patch set 3 07/29/21, 15:53

    Published edit on patch set 2.
  8. Benni Mack updated the commit message in patch set 4 07/29/21, 15:53

  9. core-ci voted on patch set 3 V +1 07/29/21, 16:04 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/13890

  10. core-ci voted on patch set 4 V +1 07/29/21, 16:04 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/13891

  11. Nikita Hovratov voted on patch set 4 V +1 CR +1 07/29/21, 16:19

  12. Christian Kuhn voted on patch set 4 CR +1 07/29/21, 16:23

  13. Christian Kuhn voted on patch set 4 V +2 CR +2 07/29/21, 19:03

  14. Christian Kuhn merged patch set 5 07/29/21, 19:03