Bug #80163

Flexform displaycond with switchableControllerActions sys_category tree not working

Added by Sascha Schieferdecker almost 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
Start date:
2017-03-07
Due date:
% Done:

0%

TYPO3 Version:
8
PHP Version:
7.0
Tags:
flexform, displaycond, regression
Complexity:
Is Regression:
Yes
Sprint Focus:

Description

With TYPO3 8.6.1 the following flexform (simplified and shortenend for the sake of readibility) does not show any sys_categories, because the displaycond throws an error 500:

...
<switchableControllerActions>
<TCEforms>
<label>Show complete directory or single entry?</label>
<config>
<type>select</type>
<items>
<numIndex index="0">
<numIndex index="0">Show complete directory</numIndex>
<numIndex index="1">Eintrag->directory;Eintrag->listByCategory;Eintrag->show</numIndex>
</numIndex>
<numIndex index="2">
<numIndex index="0">Show single entry</numIndex>
<numIndex index="1">Eintrag->show</numIndex>
</numIndex>
</items>
</config>
<onChange>reload</onChange>
</TCEforms>
</switchableControllerActions>

...

This part does not work anymore, but worked with 7.6:

<!-- Category -->
<settings.categories>
<TCEforms>
<label>Show only entries with these categories</label>
<displayCond>FIELD:switchableControllerActions:=:Eintrag->directory;Eintrag->listByCategory;Eintrag->show</displayCond>
<config>
<type>select</type>
<autoSizeMax>10</autoSizeMax>
<foreign_table>sys_category</foreign_table>
<foreign_table_where> AND sys_category.sys_language_uid IN (-1, 0) ORDER BY sys_category.sorting ASC</foreign_table_where>
<maxitems>9999</maxitems>
<renderMode>tree</renderMode>
<size>10</size>
<treeConfig>
<appearance>
<expandAll>1</expandAll>
<showHeader>1</showHeader>
</appearance>
<parentField>parent</parentField>
</treeConfig>
</config>
</TCEforms>
</settings.categories>

When calling the flexform, I see an XHR-Request with error 500:


#1481496170: Flex form displayCond on field "settings.categories" on flex form sheet "sDEF" references a field or field / sheet combination "switchableControllerActions" that might be defined in given data structure but is not found in data values. (More information)

RuntimeException thrown in file
/var/www/web_typo8/site/typo3/sysext/backend/Classes/Form/FormDataProvider/EvaluateDisplayConditions.php in line 516.

I also see a second XHR-request afterwards, which returns the categories correctly. But because of the first failing request, the form field stays empty and no categories show up. This only happens with categories. I have another field in the form with exwhich allows the user to select one or more single entries in the same form which works with exactly the same displaycond:


<settings.entries>
<TCEforms>
<label>Show the following entries</label>
<displayCond>FIELD:switchableControllerActions:=:Eintrag->directory;Eintrag->listByCategory;Eintrag->show</displayCond>
<config>
<type>group</type>
<internal_type>db</internal_type>
<allowed>tx_citkodirectory_domain_model_eintrag</allowed>
<size>3</size>
<maxitems>100</maxitems>
<minitems>0</minitems>
<show_thumbs>1</show_thumbs>
<wizards>
<suggest>
<type>suggest</type>
<default>
<searchWholePhrase>1</searchWholePhrase>
</default>
</suggest>
</wizards>
</config>
</TCEforms>
</settings.entries>


Related issues

Duplicates TYPO3 Core - Bug #79657: Flexform: Ajax tree loading crashes on display condition Closed 2017-02-07

History

#1 Updated by Christian Kuhn almost 3 years ago

  • Status changed from New to Closed

this was resolved with the related issue and should be solved in v8 LTS 8.7.0

Also available in: Atom PDF