Project

General

Profile

Actions

Bug #60339

closed

displayCond for sheets in flexform with extbase settings namespace

Added by M. Ecker about 10 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2014-07-15
Due date:
% Done:

100%

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

Description

To be available in Extbase controllers via $this->settings array, flexform fields have to be named as

<settings.xyz> </settings.xyz>

If you want to use such a field as displayCond for another sheet, you'll get a problem:

<displayCond>FIELD:sDEF.settings.xyz:!=:0</displayCond>

will always be true, since the getSingleField_typeFlex() method of TYPO3\CMS\Backend\Form\FormEngine will drop the 'xyz' part (LINE 2820 ff.) and deliver FIELD:settings as displayCond to the isDisplayCondition() method.

                            case 'FIELD':
                                list($sheetName, $fieldName) = GeneralUtility::trimExplode('.', $splittedCondition[1]);
                                $fieldValue = $editData['data'][$sheetName][$lang][$fieldName];
                                $splittedCondition[1] = $fieldName;
                                $dataStruct['ROOT']['TCEforms']['displayCond'] = join(':', $splittedCondition);
                                $fakeRow = array($fieldName => $fieldValue);
                                break;

That's only a problem if you want to use the xyz setting not only as displayCond, but also within your controller - but in my current extension I have to do this...


Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Bug #42333: Flexform displayConditionRejected2012-10-24

Actions
Related to TYPO3 Core - Feature #57482: FlexForms: DisplayCondition for Sheet in ExtBase Plugin Closed2014-04-01

Actions
Has duplicate TYPO3 Core - Bug #63061: displayCond for sheets in flexformClosed2014-11-19

Actions
Actions #1

Updated by Eric Chavaillaz over 9 years ago

I confirm this issue...

Actions #2

Updated by Loon Buster over 9 years ago

hello.

still active (in 6.2.6.)

.loon

[edit] https://forge.typo3.org/issues/63061

Actions #3

Updated by Mathias Schreiber over 9 years ago

Loon Buster wrote:
//list($sheetName, $fieldName) = GeneralUtility::trimExplode('.', $splitCondition1);

$tempArray = GeneralUtility::trimExplode('.', $splitCondition1);
$sheetName = $tempArray0;
array_shift($tempArray);
$fieldName = implode('.', $tempArray);

$fieldValue = $editData['data'][$sheetName][$lang][$fieldName];
$splitCondition1 = $fieldName;
$dataStruct['ROOT']['TCEforms']['displayCond'] = join(':', $splitCondition);
$fakeRow = array($fieldName => $fieldValue);
break;

Actions #4

Updated by Pascal Dürsteler over 9 years ago

Is this really still an issue or is it just me? Because I have the same problem right now in 6.2.7. According to http://lists.typo3.org/pipermail/typo3-project-typo3v4mvc/2014-June/014909.html it should work, but I can't manage to get it to work.

Actions #5

Updated by Pascal Dürsteler over 9 years ago

Sorry, my fault. This works as intended. Can be closed.

Actions #6

Updated by Uwe Wiebach over 9 years ago

Pascal Dürsteler wrote:

Sorry, my fault. This works as intended. Can be closed.

No, this is still an issue but your case (or at least the one you linked to) is different as it handles fields. Here it's about display conditions for sheets ...

LoonBusters solution works but it would be nice if we could also have multiple conditions (linked by AND or OR) - as it's possible with fields.

Actions #7

Updated by Gerrit Code Review over 8 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/44370

Actions #8

Updated by Gerrit Code Review over 8 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/44370

Actions #9

Updated by Morton Jonuschat over 8 years ago

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

Updated by Benni Mack almost 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF