in2code-de / powermail

This is the official repository of the TYPO3 extension powermail! Powermail is a well-known, editor-friendly, powerful and easy mailform extension for TYPO3
https://in2code.de
86 stars 174 forks source link

Keep uploaded files on validation error response #892

Open denislorch opened 1 year ago

denislorch commented 1 year ago

In case a Powermail form with a file field throws a server sided validation error on submit (for example in the E-Mail or Captcha field), the previous appended files are lost in the response, other field values are available (as expected). Without an validation error, the files are stored and showed in the file field template.

What is the intentional behvaiour for files in this case?

On the technical side, the FormController::initializeCreateAction() is executed and stops before the FormController::createAction() => UploadedDataProcessor run.

Discovered under

TYPO3 v10.4.37 Powermail v8.4.2 PHP v7.4.11

denislorch commented 1 year ago

I solved this "issue" using the In2code\Powermail\ViewHelpers\Misc\PrefillFieldViewHelper::render signal slot, a missing / changed condition and the Powermail UploadService.

mschwemer commented 4 weeks ago

We should check that for v12 / v13