Affected Version
2026.2
Affected capability
Data Objects
Steps to reproduce
- Create data object classes
Material, MaterialGroup and Series — none of them with an explicit group set.
- Add a
manyToOneRelation (or any other relation type) field to a class and open its settings in the Studio class editor.
- Open the Allowed classes select.
Actual Behavior
- The dropdown contains duplicate entries:
Material appears twice — once for the real class and once for the group/folder node that ClassDefinitionTreeService derives from the class-name prefix (Material + MaterialGroup → folder named Material). Same for any other prefix collision (e.g. Product/ProductForm).
- Phantom entries appear for group names that are not classes at all (e.g.
Royalty for RoyaltyCollector/RoyaltyCost).
- The duplicate option values break rendering of the virtualized dropdown, so valid classes such as
Series no longer show up and cannot be selected as allowed class.
- A folder/group name can be selected and saved as "allowed class" even though no such class exists.
Root cause: useClassDefinitionOptions (studio-ui-bundle, assets/js/src/core/modules/field-definitions/dynamic-types/hooks/use-class-definition-options.ts) fetches the class definition tree with withGroup: true and its flattenTreeNodes() emits the folder (group) nodes themselves as selectable options in addition to their children. The hook is used by all six relation field types.
Reproduced on v2026.1.6, still present on 2026.x / v2026.2.1.
Expected Behavior
The allowed-classes select lists every data object class exactly once and never offers group/folder names as selectable values.
Fix provided in PR: pimcore/studio-ui-bundle#3930
Affected Version
2026.2
Affected capability
Data Objects
Steps to reproduce
Material,MaterialGroupandSeries— none of them with an explicit group set.manyToOneRelation(or any other relation type) field to a class and open its settings in the Studio class editor.Actual Behavior
Materialappears twice — once for the real class and once for the group/folder node thatClassDefinitionTreeServicederives from the class-name prefix (Material+MaterialGroup→ folder namedMaterial). Same for any other prefix collision (e.g.Product/ProductForm).RoyaltyforRoyaltyCollector/RoyaltyCost).Seriesno longer show up and cannot be selected as allowed class.Root cause:
useClassDefinitionOptions(studio-ui-bundle,assets/js/src/core/modules/field-definitions/dynamic-types/hooks/use-class-definition-options.ts) fetches the class definition tree withwithGroup: trueand itsflattenTreeNodes()emits the folder (group) nodes themselves as selectable options in addition to their children. The hook is used by all six relation field types.Reproduced on v2026.1.6, still present on
2026.x/ v2026.2.1.Expected Behavior
The allowed-classes select lists every data object class exactly once and never offers group/folder names as selectable values.
Fix provided in PR: pimcore/studio-ui-bundle#3930