{"record":{"id":"9bbecc042bbde489","repo":"octobercms/october","slug":"invalid-treeview-branch-drag-and-drop-mode","errorCode":null,"errorMessage":"Invalid treeview branch drag and drop mode: {}","messagePattern":"Invalid treeview branch drag and drop mode: (.+?)","errorType":"exception","errorClass":"SystemException","httpStatus":null,"severity":"error","filePath":"modules/backend/vuecomponents/treeview/NodeDefinition.php","lineNumber":309,"sourceCode":"     * child nodes using userData object properties.\n     * Syntax: propertyName1,propertyName2:desc.\n     */\n    public function setSortBy(string $sortBy)\n    {\n        $this->sortBy = $sortBy;\n\n        return $this;\n    }\n\n    /**\n     * Sets tree branch drag and drop mode - sort, move (or both), or custom.\n     * Only the root node drag and drop mode is considered.\n     */\n    public function setDragAndDropMode(array $mode)\n    {\n        foreach ($mode as $option) {\n            if (!in_array($option, [self::DND_MOVE, self::DND_SORT, self::DND_CUSTOM, self::DND_CUSTOM_EXTERNAL])) {\n                throw new SystemException('Invalid treeview branch drag and drop mode: '.$option);\n            }\n\n            if ($option === self::DND_CUSTOM && count($mode) > 1) {\n                throw new SystemException('Treeview branch drag and drop Custom mode cannot be combined with other modes');\n            }\n        }\n\n        if ($this->groupBy) {\n            throw new SystemException('Drag and drop is not supported for treeview branches with enabled Group By feature');\n        }\n\n        $this->dragAndDropMode = $mode;\n\n        return $this;\n    }\n\n    /**\n     * Sets optional grouping for a tree branch.","sourceCodeStart":291,"sourceCodeEnd":327,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/backend/vuecomponents/treeview/NodeDefinition.php#L291-L327","documentation":"Error \"Invalid treeview branch drag and drop mode: {}\" thrown in octobercms/october.","triggerScenarios":"Thrown at modules/backend/vuecomponents/treeview/NodeDefinition.php:309 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"}