Bug #82252

Typoscript formDefinitionOverrides do override the Flexform setting overrides

Added by Denis Mir over 2 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Form Framework
Target version:
-
Start date:
2017-08-31
Due date:
% Done:

100%

TYPO3 Version:
8
PHP Version:
7.1
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:
On Location Sprint

Description

We are using the typoscript "formDefinitionOverrides" to be able to set form definition settings depending on the current environment and language.

This does work fine and looks like this:

plugin.tx_form {
  settings {
    formDefinitionOverrides {
      ContactForm {
        finishers {
          0 {
            options {
              recipientAddress = {$plugin.configuration.site.extensions.form.contact.recipientAddress}
            }
          }
        }
      }
    }
  }
}

But it should be possible to override these settings by the flexform finisher overrides. Unfortunately the ordering in the "FormFrontendController" makes this impossible:

            $formDefinition = $this->formPersistenceManager->load($this->settings['persistenceIdentifier']);
            $formDefinition['persistenceIdentifier'] = $this->settings['persistenceIdentifier'];
            $formDefinition = $this->overrideByFlexFormSettings($formDefinition);
            $formDefinition = $this->overrideByTypoScriptSettings($formDefinition);

It doesn't make sense to override flexform settings by typoscript settings. In my opinion (formhandler worked the same way) the flexform settings should be the most important setting.

Associated revisions

Revision 71950c54 (diff)
Added by Łukasz Uznański over 2 years ago

[!!!][BUGFIX] EXT:form - FlexForm settings overrule TypoScript settings

Releases: master
Resolves: #82252
Change-Id: I5cddefe1fd3fbf97e2cdc1aea1f373ef2076da72
Reviewed-on: https://review.typo3.org/54071
Reviewed-by: Bjoern Jacob <>
Reviewed-by: Joerg Kummer <>
Tested-by: Joerg Kummer <>
Tested-by: TYPO3com <>
Reviewed-by: Ralf Zimmermann <>
Tested-by: Ralf Zimmermann <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>

History

#1 Updated by Denis Mir over 2 years ago

  • Subject changed from Typoscript form definition overrides do override the Flexform setting overrides to Typoscript formDefinitionOverrides do override the Flexform setting overrides

#2 Updated by Andreas Krämer over 2 years ago

I can confirm this issue (TYPO3 8.7.4).
Flexforms can be used within multiple content elements on a single page, but Typoscript can only be set for the whole page. So flexforms have to be able to overwrite the typoscript values.

Maybe this could be solved by switching line 60 and 61 in the FormFrontendController (not tested):
https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/form/Classes/Controller/FormFrontendController.php

#3 Updated by Bjoern Jacob over 2 years ago

  • Sprint Focus set to Remote Sprint

#4 Updated by Gerrit Code Review over 2 years ago

  • Status changed from New 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/54071

#5 Updated by Łukasz Uznański over 2 years ago

  • Sprint Focus changed from Remote Sprint to On Location Sprint

#6 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/54071

#7 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/54071

#8 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/54071

#9 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/54071

#10 Updated by Łukasz Uznański over 2 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#11 Updated by Benni Mack over 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF