{"record":{"id":"408d4bc0916db317","repo":"octobercms/october","slug":"invalid-treeview-branch-group-by-mode","errorCode":null,"errorMessage":"Invalid treeview branch group by mode: {}","messagePattern":"Invalid treeview branch group by mode: (.+?)","errorType":"exception","errorClass":"SystemException","httpStatus":null,"severity":"error","filePath":"modules/backend/vuecomponents/treeview/NodeDefinition.php","lineNumber":353,"sourceCode":"            throw new SystemException('Treeview branch grouping is only supported for the LIST display mode');\n        }\n\n        if ($this->dragAndDropMode) {\n            throw new SystemException('Drag and drop is not supported for treeview branches with enabled Group By feature');\n        }\n\n        $this->groupBy = $property;\n\n        return $this;\n    }\n\n    /**\n     * setGroupByMode\n     */\n    public function setGroupByMode(string $mode)\n    {\n        if (!in_array($mode, [self::GROUP_BY_MODE_NESTING, self::GROUP_BY_MODE_FOLDERS])) {\n            throw new SystemException('Invalid treeview branch group by mode: '.$mode);\n        }\n\n        $this->groupByMode = $mode;\n\n        return $this;\n    }\n\n    /**\n     * addRootMenuItem\n     */\n    public function addRootMenuItem($type, ?string $label = null, ?string $command = null)\n    {\n        if (!$this->rootMenuItems) {\n            $this->rootMenuItems = new ItemDefinition(ItemDefinition::TYPE_TEXT, 'root', 'none');\n        }\n\n        return $this->rootMenuItems->addItem($type, $label, $command);\n    }","sourceCodeStart":335,"sourceCodeEnd":371,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/backend/vuecomponents/treeview/NodeDefinition.php#L335-L371","documentation":"Error \"Invalid treeview branch group by mode: {}\" thrown in octobercms/october.","triggerScenarios":"Thrown at modules/backend/vuecomponents/treeview/NodeDefinition.php:353 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b608633a7e8922487d91a8161499020121c3b3bf","analyzedAt":"2026-08-21T04:24:57.515Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}