Feature #82214
closedLet Extbase automatically prefix FlexForm variables with "settings." if missing
0%
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.
Updated by Gerrit Code Review about 7 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
Updated by Gerrit Code Review about 7 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
Updated by Gerrit Code Review about 7 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
Updated by Gerrit Code Review about 7 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
Updated by Gerrit Code Review about 7 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
Updated by Gerrit Code Review about 7 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
Updated by Christian Kuhn about 3 years ago
- Status changed from Under Review to Rejected