Project

General

Profile

Actions

Bug #93962

open

Form variants for EmailToReceiver doesn't work

Added by asdasdsa maximustermax about 3 years ago. Updated 2 months ago.

Status:
Under Review
Priority:
Should have
Category:
Form Framework
Target version:
-
Start date:
2021-04-21
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
8.1
Tags:
form, finisher, variants
Complexity:
Is Regression:
Sprint Focus:
Remote Sprint

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
Actions #1

Updated by Björn Jacob over 2 years ago

  • Sprint Focus set to Remote Sprint
Actions #2

Updated by Mathias Brodala over 2 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?

Actions #3

Updated by Mathias Brodala over 2 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.

Actions #4

Updated by Mathias Brodala over 2 years ago

  • Status changed from Needs Feedback to Accepted
Actions #5

Updated by Mathias Brodala over 2 years ago

  • Status changed from Accepted to In Progress
  • Assignee set to Mathias Brodala
Actions #6

Updated by Gerrit Code Review over 2 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

Actions #7

Updated by Gerrit Code Review over 2 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

Actions #8

Updated by Gerrit Code Review over 2 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

Actions #9

Updated by Gerrit Code Review over 2 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

Actions #10

Updated by Gerrit Code Review over 2 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

Actions #11

Updated by Gerrit Code Review over 2 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

Actions #12

Updated by Gerrit Code Review over 2 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

Actions #13

Updated by Gerrit Code Review about 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

Actions #14

Updated by Gerrit Code Review about 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

Actions #15

Updated by Gerrit Code Review about 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

Actions #16

Updated by Gerrit Code Review about 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

Actions #17

Updated by Stefan Terborg almost 2 years ago

Still present with TYPO3 11.5.12, I think.
Will this be fixed?

Actions #18

Updated by Stefan Froemken over 1 year 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

Actions #19

Updated by Uwe Wiebach over 1 year 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.

Actions #20

Updated by Chris W 6 months 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.

Actions #21

Updated by Michael Sollmann 2 months ago

Still present in TYPO3 12.4.11

Actions

Also available in: Atom PDF