octobercms/october · error · Error
Nodes belonging to branches with SORT drag and drop option…
Error message
Nodes belonging to branches with SORT drag and drop option cannot be sortable using the sortBy option. Node path: {} What it means
Configuration-conflict error raised in the treeview node component's mounted hook: the branch is configured with drag and drop mode SORT (JS-side reordering) while a sortBy option is also active. Sorting order would be overwritten by every drag, so the combination is rejected as contradictory.
Solutions
- Choose one ordering mechanism: either DND sort drag and drop or sortBy, not both
- Use DND_CUSTOM drag and drop if server-side ordering alongside sortBy is required
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at modules/backend/vuecomponents/treeview/assets/js/node.js:739 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/5afdd596296100c8.
Report an issue: GitHub.
Appendix: source
Thrown at modules/backend/vuecomponents/treeview/assets/js/node.js:739
$(this.$refs.contextmenuTrigger).removeAttr('aria-expanded');
this.contextMenuVisible = false;
},
onMenuClosedWithEsc: function () {
var that = this;
nextTick(function () {
that.$refs.contextmenuTrigger.focus();
});
}
},
mounted: function onMounted() {
this.expanded = localStorage.getItem(this.expandStatusStorageKey) == '1';
this.menuId = $.oc.domIdManager.generate('dropdown-menu');
this.menuButtonId = $.oc.domIdManager.generate('treeview-menu-button');
this.menuLabelId = $.oc.domIdManager.generate('treeview-menu-label');
if (this.dragAndDropSortable && this.branchSortBy) {
throw new Error(
'Nodes belonging to branches with SORT drag and drop option cannot be sortable using the sortBy option. Node path: ' +
this.keyPathString
);
}
if (this.dragAndDropMovable && this.branchDisplayMode == 'list') {
throw new Error(
'Treeview branch in LIST mode cannot have the MOVE drag and drop option enabled. Node path: ' +
this.keyPathString
);
}
if (this.branchGroupBy && this.branchDisplayMode !== 'list') {
throw new Error(
'Treeview branch in LIST mode cannot have the groupBy property set. Node path: ' + this.keyPathString
);
}
View on GitHub (pinned to b608633a7e)