Issue Bug Closed

#76536FormDataProviders do not handle placeholder values for select, group, inline correctly

Andreas Allacher 06/09/16, 08:14 updated 08/11/26, 08:46

Description

There are currently FormDataProviders that are related to placeholder handling:

1.) \TYPO3\CMS\Backend\Form\FormDataProvider\TcaColumnsProcessPlaceholders
here the first check in the loop is that only input and text fields are handled.
Here also select, group and inline should be allowed as those are the the values handled in
getPlaceholderValue of \TYPO3\CMS\Backend\Form\FormDataProvider\TcaInputPlaceholders

2.) \TYPO3\CMS\Backend\Form\FormDataProvider\TcaInputPlaceholders
the same issue in the loop regarding allowed types check as in
\TYPO3\CMS\Backend\Form\FormDataProvider\TcaColumnsProcessPlaceholders

3.) \TYPO3\CMS\Backend\Form\FormDataProvider\TcaInputPlaceholders::getPlaceholderValue method has a bug:
It always casts the return value to a string.
However, that should only be done if we are at recursionLevel === 0
as otherwise the code before the return value:

if ($recursionLevel === 0 && is_array($value)) {
            $value = implode(', ', $value);
        }

will not do anything if we needed to call the method more than once (recursionLevel > 0)

Reviews 3