Project

General

Profile

Actions

Bug #87615

closed

Variants don't use the finisherIdentifier for condition evaluation

Added by Ralf Zimmermann almost 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Category:
Form Framework
Target version:
-
Start date:
2019-02-01
Due date:
% Done:

100%

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

Description

The docs (https://github.com/TYPO3/TYPO3.CMS/blob/9.5/typo3/sysext/core/Documentation/Changelog/9.4/Feature-84133-IntroduceVariants.rst#finisheridentifier-string) tell us, that we can use the identifier from a finisher within a form variant condition like:

type: Form
identifier: test
label: test
prototypeName: standard
finishers:
  -
    identifier: EmailToReceiver
    options:
      subject: xxx
      recipientAddress: foo@example.com
      recipientName: xxx
      senderAddress: foo@example.com
      senderName: ''
      replyToAddress: ''
      carbonCopyAddress: ''
      blindCarbonCopyAddress: ''
      format: html
      attachUploads: true
      translation:
        language: ''
renderables:
  -
    type: Page
    identifier: page-1
    label: Step
    renderables:
      -
        type: Text
        identifier: text-1
        label: 'Text 1'
        variants:
          -
            identifier: hide-1
            renderingOptions:
              enabled: false
            condition: 'stepType == "SummaryPage" || finisherIdentifier in ["EmailToSender", "EmailToReceiver"]'
  -
    type: SummaryPage
    identifier: summarypage-1
    label: 'Summary step'

The condition 'finisherIdentifier in ["EmailToSender", "EmailToReceiver"]' does not work because of a wrong implementation (https://github.com/TYPO3/TYPO3.CMS/blob/9.5/typo3/sysext/form/Classes/Domain/Runtime/FormRuntime.php#L1050). The finisherIdentifier is taken from the finisher implementaion class name without the "Finisher" appendix.
Since the EmailToSender and EmailToReceiver finishers are alias names for the EmailFinisher implementation, the result is the string "Email" within the condition variable "finisherIdentifier".


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #85301: EXT:form - show hidden fields in notification mail (finisher)Closed2018-06-18

Actions
Actions

Also available in: Atom PDF