octobercms/october · error · ApplicationException
backend::lang.model.invalid_class
Error message
backend::lang.model.invalid_class
What it means
Error "backend::lang.model.invalid_class" thrown in octobercms/october.
Source
Thrown at modules/backend/behaviors/RelationController.php:369
$field = post(self::PARAM_FIELD);
}
$this->config = $this->originalConfig;
$this->model = $model;
$this->field = $field;
if (!$field) {
return;
}
if (!$this->model) {
throw new ApplicationException(Lang::get('backend::lang.relation.missing_model', [
'class' => get_class($this->controller),
]));
}
if (!$this->model instanceof Model) {
throw new ApplicationException(Lang::get('backend::lang.model.invalid_class', [
'model' => get_class($this->model),
'class' => get_class($this->controller),
]));
}
// Configuration details
if (!$this->relationHasField($field)) {
throw new ApplicationException(Lang::get('backend::lang.relation.missing_definition', compact('field')));
}
$this->applyExtraConfig($field);
$this->alias = camel_case('relation ' . HtmlHelper::nameToId($field));
$this->config = $this->makeConfig($this->originalConfig->{$field}, $this->requiredRelationProperties);
$this->controller->relationExtendConfig($this->config, $this->field, $this->model);
$this->manageId = $this->getManageIdForField($field);
$this->pivotId = post('pivot_id');
$this->foreignId = post('foreign_id');
[$this->sessionKey, $this->relationSessionKey] = $this->getSessionKeysForField($field);View on GitHub (pinned to b608633a7e)
When it happens
Trigger: Thrown at modules/backend/behaviors/RelationController.php:369 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/508cb10dd5ae3706.
Report an issue: GitHub.