Project

General

Profile

Actions

Bug #89730

closed

The EmailFinisher does not parse variables before assigning to the view

Added by Rémy DANIEL over 4 years ago. Updated over 4 years ago.

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

100%

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

Description

Hello

Context

Following this guide: [https://docs.typo3.org/c/typo3/cms-form/8.7/en-us/Concepts/FrontendRendering/Index.html#concepts-frontendrendering-codecomponents-customfinisherimplementations-finishercontext-sharedatabetweenfinishers]

I am trying to get a variable from a previous finisher and to set it in the variables of a next finisher.
Here is the summary of the finishers in the form definition:

finishers:
-
    identifier: SaveToDatabase
    options:
       table: 'tx_myext_domain_model_offer'
       mode: 'insert'
       ...
-
    identifier: EmailFinisher
    options:
      ...
      variables:
        recordUid: '{SaveToDatabase.insertedUids.0}'

Issue

In the fluid template of the email, the value of the variable {recordUid} is SaveToDatabase.insertedUids.0.

Expected

In the fluid template of the email, the value of the variable {recordUid} should be the UID of the record created by the finisher SaveToDatabase.

Solution

In \TYPO3\CMS\Form\Domain\Finishers\EmailFinisher::initializeStandaloneView(), $this->parseOption should be used instead of directly accessing $this->options.

Reproduced on TYPO3 8 and 9.

Actions

Also available in: Atom PDF