From d1c892c9f0a3d99eeb3c8ad9d56652599c7fa22a Mon Sep 17 00:00:00 2001 From: Stefan Huber Date: Wed, 5 Aug 2026 15:35:30 +0200 Subject: [PATCH] BUGFIX: Prevent infinite recursion in form element node label The label expression of `Neos.Form.Builder:FormElement` fell back to `Neos.Node.label(node)`. On Neos 9 that helper delegates to `DelegatingNodeLabelRenderer`, which evaluates the node type's own label expression again - so the expression calls itself until PHP aborts with "Maximum call stack size reached. Infinite recursion?". Every form element without an identifier and without a label is affected; `StaticText` and `Section` disable the `IdentifierMixin`. As the content tree renders a label for every node of a document, the `/neos/ui-services/flow-query` request fatals and the Neos UI content tree keeps spinning, leaving the document uneditable. Use the fallback the core renders for node types without a label expression instead: the node type name, plus the node name in parentheses when the node has one. --- Configuration/NodeTypes.FormElement.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Configuration/NodeTypes.FormElement.yaml b/Configuration/NodeTypes.FormElement.yaml index c020029..738557b 100644 --- a/Configuration/NodeTypes.FormElement.yaml +++ b/Configuration/NodeTypes.FormElement.yaml @@ -9,7 +9,11 @@ constraints: nodeTypes: '*': false - label: "${node.properties.identifier || node.properties.label || ((Neos.Node.label(node) || node.nodeTypeName) + ' (' + node.name + ')')}" + # Note: this must not fall back to Neos.Node.label(node) - that delegates to + # DelegatingNodeLabelRenderer, which evaluates this very expression again and + # thus recurses infinitely. The fallback below mirrors the label the core + # renders for node types without a label expression. + label: "${node.properties.identifier || node.properties.label || (node.nodeTypeName.value + (node.name ? ' (' + node.name.value + ')' : ''))}" ui: inlineEditable: true label: 'Form Element'