Project

General

Profile

Actions

Bug #100983

closed

Problem with file upload in extbase form

Added by Sebastian Fischer over 1 year ago. Updated 6 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2023-06-09
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
12
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

On the page https://www.startup-pitch.nrw/ i have multiple file uploads like this

<input required="required" accept="image/gif, image/jpeg, image/png, image/*" data-accept="image" class="custom-file-input" id="upload-portrait" style="opacity: 0" title="Lade dein Foto hoch *" type="file" name="tx_digreg_registration[newRegistrations][photo]" />

I experience a problem with the extbase RequestBuilder::build. There a condition after the "// backwards compatibility" changes the $fileParameters from

$fileParameters = [
'newRegistrations' => [
'photo' => [
'name'.....
]
]
]

into this

$fileParameters = [
'photo' => [
'name'.....
]
]

which leads to an

$extbaseAttribute->arguments = [
'newRegistrations' => ...
'photo' => ...
]

By this the photo is not available as part of the Registrations $newRegistrations argument in the createAction.

Once i disabled the

$fileParameters = reset($fileParameters);

the photo is part of the newRegistrations argument and gets handles correctly in the controller.


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #102361: form multiple breaks RequestParametersClosed2023-11-10

Actions
Related to TYPO3 Core - Bug #102271: Broken backwards compatibility in request builder for file uploads as object propertyClosed2023-10-27

Actions
Actions #2

Updated by Andreas Wolf 8 months ago

  • Related to Bug #102361: form multiple breaks RequestParameters added
Actions #3

Updated by Andreas Wolf 8 months ago

This was fixed in main already, see #102271. Should still be fixed for v12 IMO.

Actions #4

Updated by Andreas Wolf 8 months ago

During a session at T3CMD24 we realized that this behaviour actually comes from the backwards compatibility layer introduced in #97214; that layer was removed for main, but in v12, some people might rely on it now since v12 was released quite a while ago. Therefore, I personally would not fix it anymore to prevent breaking instances with a patchlevel release.

Actions #5

Updated by Georg Ringer 6 months ago

  • Related to Bug #102271: Broken backwards compatibility in request builder for file uploads as object property added
Actions #6

Updated by Georg Ringer 6 months ago

  • Status changed from New to Closed

#102271 has been merged in v12 a while ago, therefore closing this issue as duplicate

Actions

Also available in: Atom PDF