octobercms/october · error · ApplicationException
The model must implement the NestedTree or Sortable traits.
Error message
The model must implement the NestedTree or Sortable traits.
What it means
Error "The model must implement the NestedTree or Sortable traits." thrown in octobercms/october.
Source
Thrown at modules/backend/behaviors/ReorderController.php:218
}
/**
* validateModel validates the supplied form model.
*/
protected function validateModel()
{
$model = $this->controller->reorderGetModel();
$modelTraits = class_uses($model);
if (isset($modelTraits[\October\Rain\Database\Traits\Sortable::class])) {
$this->sortMode = 'simple';
}
elseif (isset($modelTraits[\October\Rain\Database\Traits\NestedTree::class])) {
$this->sortMode = 'nested';
$this->showTree = true;
}
else {
throw new ApplicationException('The model must implement the NestedTree or Sortable traits.');
}
return $model;
}
/**
* Returns all the records from the supplied model.
* @return Collection
*/
protected function getRecords()
{
$records = null;
$model = $this->controller->reorderGetModel();
$query = $model->newQuery();
$this->controller->reorderExtendQuery($query);
if ($this->sortMode == 'simple') {View on GitHub (pinned to b608633a7e)
When it happens
Trigger: Thrown at modules/backend/behaviors/ReorderController.php:218 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/172488c86bc53caa.
Report an issue: GitHub.