Issue Bug Under Review

#111419selectTree ignores workspace changes of the parent field and queries every node again

Benni Mack 11/12/26, 09:48 updated 11/14/26, 11:39

Description

A select field with `renderType => selectTree` and `treeConfig.parentField` (e.g. `sys_category.parent`, as used by EXT:news) builds its tree by querying the live table for each node, although FormEngine already fetched all workspace-overlaid rows of the foreign table.

## Effects

  • Moving a category to another parent in a workspace still shows it below its live parent in the select tree.
  • Building the tree runs about three queries per node (`BackendUtility::getRecord()`, a `FIND_IN_SET` query on the parent field, `BackendUtility::getRecordWSOL()` for the label).

## Steps to reproduce

1. Create the categories 1 and 2 on root level and category 3 below category 1.
2. In a workspace, change the parent of category 3 to category 2.
3. Open a record with a selectTree field on sys_category with `parentField => ‘parent’` in that workspace.

Expected: category 3 is shown below category 2. Actual: it is shown below category 1.

`type => category` fields already reuse the fetched rows (`TcaCategory` hands them over via `setAvailableItems()`), `TcaSelectTreeItems` does not.

Reviews 1

History 04