Bug #83848

f:form overrides array

Added by Hans-Georg Althoff 3 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2018-02-11
Due date:
% Done:

0%

TYPO3 Version:
8
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

my html:

<f:form action="change" controller="Folder" objectName="folders" object="{Folders}" enctype="multipart/form-data"  >
                    <f:form.textfield id="hFunc"  property="hFunc" />
                    <f:form.textfield id="hPath"  property="hPath" size="50" />
                    <hga:folder folders="{Folders}" />
                    <f:form.submit id="submit" value="Submit" />
                </f:form>

This is the part of the listAction

    $this->view->assign('Folders', $folders);

$folders is a multidimensional array, which inludes the folder structure of fileadmin.

If I get the change action called, the array $folders includes only 'hFunc' and 'hPath'. The origional array $folders is gone!
On the beginning I used the folder names as keys and added a new array for each subfolder to the folder.

After changing to only add arrays without key names, it is not woking anymore. Key are now 0, 1, 2, ...
and each folder-array has four sub values (['N'], ['P'] ,['F'] ['A'] where N and P have strings, F a int and A a array(s), if a Sub folder(s) exist.

in the html there are href with onclick to js functions which put strings in hFunc and hPath and creates click() for the submit button.

Also available in: Atom PDF