Project

General

Profile

Actions

Feature #82214

closed

Let Extbase automatically prefix FlexForm variables with "settings." if missing

Added by Claus Due over 6 years ago. Updated over 2 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2017-08-26
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

Currently, Extbase demands field names prefixed with "settings." in the FlexForm DS itself. Rather than impose this demand, it would be equally possible to automatically merge non-prefixed fields as if they had a prefix.

The reasoning being:

1. The "settings." prefix is redundant because it is always the same
2. The current requirement introduces a pitfall (why can't I access my FlexForm setting? - you misspelled "settings" or didn't prefix)
3. The use case for "I need FlexForm settings which do not automatically get assigned in $this->settings or in Fluid templates" is very slim and it is still perfectly possible to unset variables in the controller, should you not wish them in the template.
4. Removing this constraint and automatically making all FlexForm variables available in "settings." regardless of their name produces a consistent behavior
5. The current usage of dotted names conflicts with things like JSON; the core's default FlexForm variable parsing also does not understand it (which is why Extbase has a FlexFormService to do this)
6. The dotted names are not compatible with the JSON column type in MySQL which is about to be facilitated in https://forge.typo3.org/issues/82212

The solution appears fairly simple:

1. Loop the variables coming from the FlexForm
2. Detect the "settings." prefix, strip it and collect two arrays of settings: one with those that were prefixed and one with those that weren't
3. Merge the two arrays with priority to the array that contains variables which HAD the "settings." prefix (for backwards compatibility)
4. Deprecate the entire notion of needing to prefix with "settings." in FlexForm fields; it is now redundant.

Actions #1

Updated by Gerrit Code Review over 6 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/53812

Actions #2

Updated by Gerrit Code Review over 6 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/53812

Actions #3

Updated by Gerrit Code Review over 6 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/53812

Actions #4

Updated by Gerrit Code Review over 6 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/53812

Actions #5

Updated by Gerrit Code Review over 6 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/53812

Actions #6

Updated by Gerrit Code Review over 6 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/53812

Actions #7

Updated by Susanne Moog about 6 years ago

  • Category set to Extbase
Actions #8

Updated by Christian Kuhn over 2 years ago

  • Status changed from Under Review to Rejected
Actions

Also available in: Atom PDF