{"record":{"id":"08d588e1af3919f9","repo":"octobercms/october","slug":"backend-lang-model-missing-relation","errorCode":null,"errorMessage":"backend::lang.model.missing_relation","messagePattern":"backend::lang\\.model\\.missing_relation","errorType":"exception","errorClass":"ApplicationException","httpStatus":null,"severity":"error","filePath":"modules/backend/behaviors/RelationController.php","lineNumber":392,"sourceCode":"\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);\n\n        // Relationship details\n        [$nestedModel, $nestedField] = $this->makeNestedRelationModel($this->model, $this->config->valueFrom ?? $field);\n        if (!$nestedModel->hasRelation($nestedField)) {\n            throw new ApplicationException(Lang::get('backend::lang.model.missing_relation', ['class' => get_class($nestedModel), 'relation' => $nestedField]));\n        }\n\n        $this->relationParent = $nestedModel;\n        $this->relationName = $nestedField;\n        $this->relationType = $nestedModel->getRelationType($nestedField);\n        $this->relationObject = $nestedModel->{$nestedField}();\n        $this->relationModel = $this->relationObject instanceof HasOneOrMany\n            ? $this->relationObject->make()\n            : $this->relationObject->getRelated();\n\n        $this->readOnly = $this->getConfig('readOnly');\n        $this->popupSize = $this->getConfig('popupSize', 950);\n        $this->externalToolbarBus = $this->getConfig('externalToolbarBus');\n        $this->eventTarget = $this->evalEventTarget();\n        $this->deferredBinding = $this->evalDeferredBinding();\n        $this->viewMode = $this->evalViewMode();\n        $this->manageMode = $this->evalManageMode();\n        $this->manageTitle = $this->evalManageTitle();","sourceCodeStart":374,"sourceCodeEnd":410,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/backend/behaviors/RelationController.php#L374-L410","documentation":"Error \"backend::lang.model.missing_relation\" thrown in octobercms/october.","triggerScenarios":"Thrown at modules/backend/behaviors/RelationController.php:392 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"}