[BUGFIX] Filled required field reported as missing on edit form 25/55625/3
authorStanislas Rolland <typo3@sjbr.ca>
Fri, 9 Feb 2018 01:15:20 +0000 (20:15 -0500)
committerStanislas Rolland <typo3@sjbr.ca>
Fri, 9 Feb 2018 01:47:40 +0000 (02:47 +0100)
Problem: Only by specifying some parsing rule is the error removed.

Solution: Honor no parsing on any input field.

Resolves: #73532
Change-Id: I1c3cabb649814a8ac67a7d8000452673b820cae5
Reviewed-on: https://review.typo3.org/55625
Reviewed-by: Stanislas Rolland <typo3@sjbr.ca>
Tested-by: Stanislas Rolland <typo3@sjbr.ca>
ChangeLog
Classes/Domain/Data.php

index 557774f..6dc3ca8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,7 @@
        * Resolves #80409: Error in updateMMRelations with direct mail categories
        * Resolves #36192: When using captcha extension, captcha evaluation always fails
        * Resolves #81927: Removal of line breaks in plain text mails results in difficult to read mail body
+       * Resolves #73532: Filled required field reported as missing on edit form
 
 2018-02-07 Stanislas Rolland  <typo3(arobas)sjbr.ca>
        * Resolves #83799: Remove unused hidden fields from password editing form
index ea9ca07..5409031 100644 (file)
@@ -855,6 +855,7 @@ class Data
        public function parseValues(array &$dataArray, array $origArray, $cmdKey)
        {
                if (is_array($this->conf['parseValues.'])) {
+                       $parsedOrigArray = $this->parseIncomingData($origArray);
                        foreach ($this->conf['parseValues.'] as $theField => $theValue) {
                                $listOfCommands = GeneralUtility::trimExplode(',', $theValue, true);
                                if (in_array('setEmptyIfAbsent', $listOfCommands)) {
@@ -870,7 +871,7 @@ class Data
                                                if (($theField === 'password' || $theField === 'password_again') && !isset($dataArray[$theField])) {
                                                        $bValueAssigned = false;
                                                }
-                                               $dataValue = (isset($dataArray[$theField]) ? $dataArray[$theField] : $origArray[$theField]);
+                                               $dataValue = (isset($dataArray[$theField]) ? $dataArray[$theField] : $parsedOrigArray[$theField]);
                                                switch ($theCmd) {
                                                        case 'int':
                                                                $dataValue = (int) $dataValue;
@@ -984,7 +985,6 @@ class Data
                                                                }
                                                                break;
                                                        default:
-                                                               $bValueAssigned = false;
                                                                break;
                                                }
                                                if ($bValueAssigned) {