#80163Flexform displaycond with switchableControllerActions sys_category tree not working
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><br> <tceforms><br> <label>Show complete directory or single entry?</label><br> <config><br> <type>select</type><br> <items><br> <numindex index="0"><br> <numindex index="0">Show complete directory</numindex><br> <numindex index="1">Eintrag->directory;Eintrag->listByCategory;Eintrag->show</numindex><br> </numindex><br> <numindex index="2"><br> <numindex index="0">Show single entry</numindex><br> <numindex index="1">Eintrag->show</numindex><br> </numindex><br> </items><br> </config><br> <onchange>reload</onchange><br> </tceforms><br> </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>
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.