octobercms/october · error · Error

Node user data is not set. Cannot use the displayProperty…

Error message

Node user data is not set. Cannot use the displayProperty value. {}

What it means

Thrown in the treeview node component's computed nodeText: a branchDisplayProperty is configured and the node is not a group folder, but the node's nodeData has no userData, so the display value cannot be read. The tree definition promises per-node user data for display yet this node carries none.

Solutions

  1. Attach userData containing the display property to every node supplied to the branch
  2. Drop branchDisplayProperty if nodes cannot guarantee userData
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at modules/backend/vuecomponents/treeview/assets/js/node.js:398 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of octobercms/october@b608633a7e (2026-08-21). Data as JSON: /api/errors/7c11880fb8296917. Report an issue: GitHub.

Appendix: source

Thrown at modules/backend/vuecomponents/treeview/assets/js/node.js:398

            return (
                Array.isArray(this.branchDragAndDropMode) && this.branchDragAndDropMode.indexOf('custom-external') !== -1
            );
        },

        sortedNodes: function computeSortedNodes() {
            if (!this.branchSortBy) {
                return this.groupedNodes;
            }

            return utils.sortNodes(this.groupedNodes, this.branchSortBy);
        },

        nodeText: function computeNodeText() {
            var isFolder = utils.getSystemData(this.nodeData, 'treeviewGroupFolder');

            if (!isFolder && this.branchDisplayProperty && !this.isRoot) {
                if (!this.nodeData.userData) {
                    throw new Error(
                        'Node user data is not set. Cannot use the displayProperty value. ' + this.keyPathString
                    );
                }

                return utils.getLastGroupedPathSegment(
                    this.nodeData.userData[this.branchDisplayProperty],
                    this,
                    isFolder,
                    this.branchDisplayProperty
                );
            }

            return utils.getLastGroupedPathSegment(this.nodeData.label, this, isFolder);
        },

        nodeDataObj: function computeNodeData() {
            return this.nodeData;
        },

View on GitHub (pinned to b608633a7e)