octobercms/october · error · ApplicationException
Please specify the modelClass property for reordering
Error message
Please specify the modelClass property for reordering
What it means
reorderGetModel reads the ReorderController 'modelClass' config and throws an ApplicationException when it is missing — the reorder behavior cannot instantiate its model without it. Behavior configuration is at fault.
Solutions
- Add 'modelClass' => Your\Model::class to the ReorderController configuration array
- Check for typos in the config key
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at modules/backend/behaviors/ReorderController.php:187 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/9f7e04cceeb6a31f.
Report an issue: GitHub.
Appendix: source
Thrown at modules/backend/behaviors/ReorderController.php:187
$this->vars['reorderShowTree'] = $this->showTree;
$this->vars['reorderToolbarWidget'] = $this->toolbarWidget;
}
public function reorderRender()
{
return $this->reorderMakePartial('container');
}
public function reorderGetModel()
{
if ($this->model !== null) {
return $this->model;
}
$modelClass = $this->getConfig('modelClass');
if (!$modelClass) {
throw new ApplicationException('Please specify the modelClass property for reordering');
}
return $this->model = new $modelClass;
}
/**
* Returns the display name for a record.
* @return string
*/
public function reorderGetRecordName($record)
{
return $record->{$this->nameFrom};
}
/**
* validateModel validates the supplied form model.
*/
protected function validateModel()View on GitHub (pinned to b608633a7e)