Project

General

Profile

Actions

Bug #76536

open

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

Added by Andreas Allacher over 8 years ago. Updated almost 7 years ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Start date:
2016-06-09
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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)

Actions

Also available in: Atom PDF