Bug #82833

It's not possible to replace options from FinisherVariableProvider if they are floats

Added by Daniel Siepmann about 2 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Must have
Category:
Form Framework
Target version:
Start date:
2017-10-20
Due date:
% Done:

100%

TYPO3 Version:
8
PHP Version:
7.1
Tags:
Complexity:
Is Regression:
Sprint Focus:
Remote Sprint

Description

Currently only strings and integers are allowed. This prevents further values like floats from being used while saving to database.

The following implementation prevents such use case from working:

            if (!is_string($value) && !is_int($value)) {
                $value = '{' . $match[1] . '}';
            }

https://github.com/TYPO3/TYPO3.CMS/blob/TYPO3_8-7/typo3/sysext/form/Classes/Domain/Finishers/AbstractFinisher.php#L208

To reproduce, register a custom finisher that will add a float and use this in another finisher like:

                    lat:
                        value: '{Geocode.result.geometry.location.lng}'

Associated revisions

Revision 34cf1789 (diff)
Added by Mathias Brodala almost 2 years ago

[BUGFIX] EXT:form - resolve numeric values in finishers

This fixes option parsing for finishers to return any kind of
numeric values within the form runtime or finisher variable provider.

Resolves: #82833
Releases: master, 8.7
Change-Id: I334fbd36e526823f07e57247bd63d412a3c3b0d6
Reviewed-on: https://review.typo3.org/54994
Tested-by: TYPO3com <>
Reviewed-by: Eugene Kenah Djomo <>
Reviewed-by: Benni Mack <>
Tested-by: Benni Mack <>
Reviewed-by: Bjoern Jacob <>
Tested-by: Bjoern Jacob <>
Reviewed-by: Stefan Neufeind <>
Tested-by: Stefan Neufeind <>

Revision 4fa52c79 (diff)
Added by Mathias Brodala almost 2 years ago

[BUGFIX] EXT:form - resolve numeric values in finishers

This fixes option parsing for finishers to return any kind of
numeric values within the form runtime or finisher variable provider.

Resolves: #82833
Releases: master, 8.7
Change-Id: I334fbd36e526823f07e57247bd63d412a3c3b0d6
Reviewed-on: https://review.typo3.org/55038
Tested-by: TYPO3com <>
Reviewed-by: Stefan Neufeind <>
Tested-by: Stefan Neufeind <>

History

#1 Updated by Daniel Siepmann about 2 years ago

Why at all should the return type be limited? Is this functionality only ment to be used for SaveToDatabase? Other finishers might work with arrays and even objects.

#2 Updated by Mathias Brodala almost 2 years ago

  • Assignee set to Mathias Brodala
  • Sprint Focus set to Remote Sprint

#3 Updated by Gerrit Code Review almost 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/54994

#4 Updated by Gerrit Code Review almost 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/54994

#5 Updated by Gerrit Code Review almost 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/54994

#6 Updated by Gerrit Code Review almost 2 years ago

Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55038

#7 Updated by Mathias Brodala almost 2 years ago

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

#8 Updated by Benni Mack about 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF