Bug #93962
openForm variants for EmailToReceiver doesn't work
0%
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: NotEmpty
Files
Updated by Mathias Brodala over 3 years ago
- Status changed from New to Needs Feedback
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?
Updated by Mathias Brodala over 3 years ago
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.
Updated by Mathias Brodala over 3 years ago
- Status changed from Needs Feedback to Accepted
Updated by Mathias Brodala over 3 years ago
- Status changed from Accepted to In Progress
- Assignee set to Mathias Brodala
Updated by Gerrit Code Review over 3 years ago
- Status changed from In Progress to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70586
Updated by Gerrit Code Review over 3 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70586
Updated by Gerrit Code Review over 3 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70586
Updated by Gerrit Code Review over 3 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70586
Updated by Gerrit Code Review over 3 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70586
Updated by Gerrit Code Review over 3 years ago
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70586
Updated by Gerrit Code Review about 3 years ago
Patch set 7 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70586
Updated by Gerrit Code Review over 2 years ago
Patch set 8 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70586
Updated by Gerrit Code Review over 2 years ago
Patch set 9 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70586
Updated by Gerrit Code Review over 2 years ago
Patch set 10 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70586
Updated by Gerrit Code Review over 2 years ago
Patch set 11 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70586
Updated by Stefan Terborg over 2 years ago
Still present with TYPO3 11.5.12, I think.
Will this be fixed?
Updated by Stefan Froemken over 2 years ago
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: __UNSET
The current patch works perfectly. +1 from my side
Stefan
Updated by Uwe Wiebach about 2 years ago
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.
Updated by Chris W about 1 year ago
- TYPO3 Version changed from 10 to 11
- PHP Version set to 8.1
- Tags set to form, finisher, variants
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.
Updated by Christian Ludwig 6 months ago · Edited
- PHP Version changed from 8.1 to 8.2
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).
Updated by Hannes Bochmann 6 months ago
- File form.issue-93962.patch form.issue-93962.patch added
In case anybody needs it, here is a patch for TYPO3 12.4
Updated by Gerrit Code Review about 2 months ago
Patch set 12 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70586