{"record":{"id":"508cb10dd5ae3706","repo":"octobercms/october","slug":"backend-lang-model-invalid-class","errorCode":null,"errorMessage":"backend::lang.model.invalid_class","messagePattern":"backend::lang\\.model\\.invalid_class","errorType":"exception","errorClass":"ApplicationException","httpStatus":null,"severity":"error","filePath":"modules/backend/behaviors/RelationController.php","lineNumber":369,"sourceCode":"            $field = post(self::PARAM_FIELD);\n        }\n\n        $this->config = $this->originalConfig;\n        $this->model = $model;\n        $this->field = $field;\n\n        if (!$field) {\n            return;\n        }\n\n        if (!$this->model) {\n            throw new ApplicationException(Lang::get('backend::lang.relation.missing_model', [\n                'class' => get_class($this->controller),\n            ]));\n        }\n\n        if (!$this->model instanceof Model) {\n            throw new ApplicationException(Lang::get('backend::lang.model.invalid_class', [\n                'model' => get_class($this->model),\n                'class' => get_class($this->controller),\n            ]));\n        }\n\n        // Configuration details\n        if (!$this->relationHasField($field)) {\n            throw new ApplicationException(Lang::get('backend::lang.relation.missing_definition', compact('field')));\n        }\n\n        $this->applyExtraConfig($field);\n        $this->alias = camel_case('relation ' . HtmlHelper::nameToId($field));\n        $this->config = $this->makeConfig($this->originalConfig->{$field}, $this->requiredRelationProperties);\n        $this->controller->relationExtendConfig($this->config, $this->field, $this->model);\n        $this->manageId = $this->getManageIdForField($field);\n        $this->pivotId = post('pivot_id');\n        $this->foreignId = post('foreign_id');\n        [$this->sessionKey, $this->relationSessionKey] = $this->getSessionKeysForField($field);","sourceCodeStart":351,"sourceCodeEnd":387,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/backend/behaviors/RelationController.php#L351-L387","documentation":"Error \"backend::lang.model.invalid_class\" thrown in octobercms/october.","triggerScenarios":"Thrown at modules/backend/behaviors/RelationController.php:369 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"}