#93962Form variants for EmailToReceiver doesn't work
Description
It is not possible to use different emails for languages.
Variants doesn’t work for EmailToReceiver.
renderingOptions:
submitButtonLabel: Submit
type: Form
identifier: contact
label: Form
prototypeName: standard
finishers:
-
options:
message: confirm
contentElementUid: ''
identifier: Confirmation
-
options:
subject: 'Subject'
recipients:
first@domain.tld: ''
senderAddress: noreply@domain.tld
senderName: ''
addHtmlPart: true
attachUploads: true
translation:
language: ''
useFluidEmail: true
title: ''
identifier: EmailToReceiver
variants:
-
identifier: variant-1
condition: 'siteLanguage("twoLetterIsoCode") == "en"'
finishers:
-
identifier: EmailToReceiver
options:
recipients:
second@domain.tld: ''
renderables:
-
renderingOptions:
previousButtonLabel: 'Previous step'
nextButtonLabel: 'Next step'
type: Page
identifier: page-1
label: ''
renderables:
-
defaultValue: ''
type: Textarea
identifier: message
label: Message
properties:
fluidAdditionalAttributes:
required: required
validators:
-
identifier: NotEmptyReviews 1
History 1224
-
Björn Jacob changed Sprint Focus Remote Sprint <span data-processor="relativetime" data-value="2021-08-06T13:15:18+00:00" > 08/06/21, 13:15 </span>
-
Mathias Brodala commented and changed status
NewNeeds Feedback <span data-processor="relativetime" data-value="2021-08-13T10:36:03+00:00" > 08/13/21, 10:36 </span> -
Mathias Brodala commented <span data-processor="relativetime" data-value="2021-08-13T16:05:19+00:00" > 08/13/21, 16:05 </span>
The issue I can see is that the finisher options are not merged. Instead the finisher variant is added as new finisher and thus obviously misses everything from the base finisher.
-
Mathias Brodala changed status
Needs FeedbackAccepted <span data-processor="relativetime" data-value="2021-08-13T16:05:28+00:00" > 08/13/21, 16:05 </span> -
Mathias Brodala changed status
AcceptedIn Progress assigned to Mathias Brodala <span data-processor="relativetime" data-value="2021-08-13T16:34:23+00:00" > 08/13/21, 16:34 </span> -
Gerrit Code Review pushed patch set 1 for master to change 70586 status
In ProgressUnder Review <span data-processor="relativetime" data-value="2021-08-13T16:36:28+00:00" > 08/13/21, 16:36 </span> -
Gerrit Code Review pushed patch set 2 for master to change 70586 <span data-processor="relativetime" data-value="2021-08-14T12:24:55+00:00" > 08/14/21, 12:24 </span>
-
Gerrit Code Review pushed patch set 3 for master to change 70586 <span data-processor="relativetime" data-value="2021-08-14T12:31:05+00:00" > 08/14/21, 12:31 </span>
-
Gerrit Code Review pushed patch set 4 for master to change 70586 <span data-processor="relativetime" data-value="2021-08-14T12:56:44+00:00" > 08/14/21, 12:56 </span>
-
Gerrit Code Review pushed patch set 5 for master to change 70586 <span data-processor="relativetime" data-value="2021-08-14T12:57:55+00:00" > 08/14/21, 12:57 </span>
-
Gerrit Code Review pushed patch set 6 for master to change 70586 <span data-processor="relativetime" data-value="2021-09-02T07:48:09+00:00" > 09/02/21, 07:48 </span>
-
Gerrit Code Review pushed patch set 7 for main to change 70586 <span data-processor="relativetime" data-value="2021-11-29T13:25:48+00:00" > 11/29/21, 13:25 </span>
-
Gerrit Code Review pushed patch set 8 for main to change 70586 <span data-processor="relativetime" data-value="2022-04-28T10:07:36+00:00" > 04/28/22, 10:07 </span>
-
Gerrit Code Review pushed patch set 9 for main to change 70586 <span data-processor="relativetime" data-value="2022-04-28T10:27:01+00:00" > 04/28/22, 10:27 </span>
-
Gerrit Code Review pushed patch set 10 for main to change 70586 <span data-processor="relativetime" data-value="2022-04-28T10:30:09+00:00" > 04/28/22, 10:30 </span>
-
Gerrit Code Review pushed patch set 11 for main to change 70586 <span data-processor="relativetime" data-value="2022-04-28T10:33:12+00:00" > 04/28/22, 10:33 </span>
-
Stefan Terborg commented <span data-processor="relativetime" data-value="2022-07-07T13:24:50+00:00" > 07/07/22, 13:24 </span>
Still present with TYPO3 11.5.12, I think.
Will this be fixed? -
Stefan Froemken commented <span data-processor="relativetime" data-value="2022-08-18T10:35:23+00:00" > 08/18/22, 10:35 </span>
I can confirm this issue. Overwriting specific finisher options will delete all previously configured options instead of merging them. Here is my example
finishers: 1: identifier: SaveToDatabase options: 1: table: tx_events2_domain_model_time mode: insert elements: time-begin: mapOnDatabaseColumn: time_begin databaseColumnMappings: pid: value: 8 crdate: value: '{__currentTimestamp}' tstamp: value: '{__currentTimestamp}' 2: table: tx_events2_domain_model_event mode: insert elements: choose-event-type: mapOnDatabaseColumn: event_type title: mapOnDatabaseColumn: title event-begin: mapOnDatabaseColumn: event_begin dateFormat: U event-end: mapOnDatabaseColumn: event_end dateFormat: U recurring-end: mapOnDatabaseColumn: recurring_end dateFormat: U image-1: mapOnDatabaseColumn: images image-2: mapOnDatabaseColumn: images databaseColumnMappings: pid: value: 8 crdate: value: '{__currentTimestamp}' tstamp: value: '{__currentTimestamp}' hidden: value: 1 event_time: value: '{SaveToDatabase.insertedUids.1}' variants: - identifier: prevent-storing-empty-event-time condition: 'formValues["time-begin"] == ""' finishers: 1: identifier: SaveToDatabase options: # Do not create new record for tx_events2_domain_model_time 1: __UNSET 2: databaseColumnMappings: # Remove column mapping for tx_events2_domain_model_time event_time: __UNSETThe current patch works perfectly. +1 from my side
Stefan
-
Uwe Wiebach commented <span data-processor="relativetime" data-value="2022-10-20T16:08:34+00:00" > 10/20/22, 16:08 </span>
I not only can confirm this issue (TYPO3 v10.4.32) but have (an) additional problem(s) to solve:
If more than one finisher (e.g. EmailToReceiver and Redirect) is defined, you must add them all to the variant – even if you only want to override a single option from one of them. I guess this would be solved by this patch. But at least until this is merged (hopefully not only for v12) I have the issue that I can’t let an editor override the redirect page if the variant condition is valid. I even tried to merge the finishers options within YAML. -
Chris W commented and changed TYPO3 Version
1011 PHP Version 8.1 Tags form, finisher, variants <span data-processor="relativetime" data-value="2023-10-30T08:20:20+00:00" > 10/30/23, 08:20 </span>I ran in to these problems while changing email recipient by applicationContext condition.
If there is more than one finisher defined they all will be completely overridden when a single variant for one of those finishers is added.
After updating from v11.5.23 to v11.5.32 i can’t reproduce it anymore. -
Michael Sollmann commented <span data-processor="relativetime" data-value="2024-02-22T15:59:29+00:00" > 02/22/24, 15:59 </span>
Still present in TYPO3 12.4.11
-
Christian Ludwig commented and changed PHP Version
8.18.2 <span data-processor="relativetime" data-value="2024-05-28T19:11:07+00:00" > 05/28/24, 19:11 </span>Any news on this fix? The problem is still existent in v12.4.14
Without this patch using variants for finishers produces lots of overhead when one wants to change one line only out of hundreds.
Because it might break existing form configurations we should think about an option to enable finisher merges when using variants. Maybe something like that?
variants: - identifier: ac-variant-1 condition: 'applicationContext != "Production"' mergeFinisherVariants: true finishers: - identifier: anyFinisher ...Meanwhile the documentation should be extended to clarify that finishers won’t get merged but overwritten completely (it took me quite a lot of time to find this out).
-
Hannes Bochmann commented and changed attached form.issue-93962.patch <span data-processor="relativetime" data-value="2024-06-05T11:39:01+00:00" > 06/05/24, 11:39 </span>
In case anybody needs it, here is a patch for TYPO3 12.4
-
Gerrit Code Review pushed patch set 12 for main to change 70586 <span data-processor="relativetime" data-value="2024-10-11T08:55:40+00:00" > 10/11/24, 08:55 </span>
Can you explain in more detail what “doesn’t work” mean exactly? Do you see errors or similar? What is the exact behavior you see?