Bug #66046

ViewHelper SelectView does not

Added by Daniel Wagner 4 months ago. Updated 4 months ago.

Status:Closed Start date:2015-03-26
Priority:Must have Due date:
Assigned To:- % Done:

0%

Category:Fluid Spent time: -
Target version:next-patchlevel
TYPO3 Version:6.2 Is Regression:No
PHP Version:5.3 Sprint Focus:
Complexity:

Description

Problem
TYPO3 6.2.11 together with powermail 2.2.0 produced following error with a simple select field in a form.
No identifying value for object of class "" found.

Analysis
As far as I understood the code of SelectViewHelper from fluid the $value should be added to $options if it is an object or an array.
If it is an object it has to be preprocessed. Actually above exception is thrown if it is an array instead of adding it to $options.

Suggestion

      protected function getOptions() {
                [ ... ]
                $optionsArgument = $this->arguments['options'];
                foreach ($optionsArgument as $key => $value) {
-                        if (is_object($value)) || is_array($value)) {
+                        if (is_object($value)) {
                                if ($this->hasArgument('optionValueField')) {
                                       [ ... ]
                                }
                                [ ... ]
-                        }
-                        $options[$key] = $value;
+                        if (is_object($value)) || is_array($value)) {
+                                $options[$key] = $value;
+                        }

fluid_selectViewHelper.patch Magnifier (982 Bytes) Daniel Wagner, 2015-03-26 16:02


Related issues

related to powermail - Bug #65792: No identifying value for object of class "" found. Resolved 2015-03-17
related to powermail - Bug #66048: Select Field only shows: No identifying value for object ... Rejected 2015-03-26

History

#2 Updated by Wouter Wolters 4 months ago

  • Status changed from New to Closed

this has been fixed already and will be released in 6.2.12

Also available in: Atom PDF