{"record":{"id":"a4b710b94782f78f","repo":"octobercms/october","slug":"invalid-tree-display-mode","errorCode":null,"errorMessage":"Invalid tree display mode: {}","messagePattern":"Invalid tree display mode: (.+?)","errorType":"exception","errorClass":"SystemException","httpStatus":null,"severity":"error","filePath":"modules/backend/vuecomponents/treeview/NodeDefinition.php","lineNumber":141,"sourceCode":"    protected $hideInQuickAccess = false;\n\n    /**\n     * __construct\n     */\n    public function __construct(string $label, string $key)\n    {\n        $this->label = $label;\n        $this->key = $key;\n    }\n\n    /**\n     * Sets tree branch display mode - tree or list.\n     * Only the root node display mode is considered.\n     */\n    public function setDisplayMode(string $value)\n    {\n        if (!in_array($value, [self::DISPLAY_MODE_TREE, self::DISPLAY_MODE_LIST])) {\n            throw new SystemException('Invalid tree display mode: '.$value);\n        }\n\n        if ($this->groupBy) {\n            throw new SystemException('Treeview branch grouping is only supported for the LIST display mode');\n        }\n\n        $this->displayMode = $value;\n\n        return $this;\n    }\n\n    /**\n     * Determines whether multiple nodes can be selected.\n     * Only the root node property value is considered.\n     */\n    public function setMultiSelect(bool $value)\n    {\n        $this->multiSelect = $value;","sourceCodeStart":123,"sourceCodeEnd":159,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/backend/vuecomponents/treeview/NodeDefinition.php#L123-L159","documentation":"Validation in NodeDefinition::setDisplayMode: the requested display mode string is neither DISPLAY_MODE_TREE nor DISPLAY_MODE_LIST. Only those two modes exist for treeview branch rendering, and only the root node's mode is meaningful, so anything else is a programmer error in the treeview definition.","triggerScenarios":"Thrown at modules/backend/vuecomponents/treeview/NodeDefinition.php:141 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Call setDisplayMode with NodeDefinition::DISPLAY_MODE_TREE or DISPLAY_MODE_LIST","Check for typos or dynamically built mode strings that produce an invalid value"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b608633a7e8922487d91a8161499020121c3b3bf","analyzedAt":"2026-08-21T04:24:57.515Z","contentChangedAt":"2026-08-21T04:24:57.515Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}