{"record":{"id":"70b4203738fc6e99","repo":"octobercms/october","slug":"form-behavior-used-in-class-does-not-have-a-model","errorCode":null,"errorMessage":"Form behavior used in :class does not have a model defined.","messagePattern":"Form behavior used in :class does not have a model defined\\.","errorType":"exception","errorClass":"SystemException","httpStatus":null,"severity":"error","filePath":"modules/backend/widgets/Form.php","lineNumber":379,"sourceCode":"    /**\n     * initFormTabs\n     */\n    protected function initFormTabs()\n    {\n        $this->allTabs = (object) $this->allTabs;\n        $this->allTabs->outside = new FormTabs(['section' => FormTabs::SECTION_OUTSIDE]);\n        $this->allTabs->primary = new FormTabs(['section' => FormTabs::SECTION_PRIMARY]);\n        $this->allTabs->secondary = new FormTabs(['section' => FormTabs::SECTION_SECONDARY]);\n    }\n\n    /**\n     * validateModel validates the supplied form model.\n     * @return mixed\n     */\n    protected function validateModel()\n    {\n        if (!$this->model) {\n            throw new SystemException(Lang::get(\n                'backend::lang.form.missing_model',\n                ['class'=>get_class($this->controller)]\n            ));\n        }\n\n        $this->data = isset($this->data)\n            ? (object) $this->data\n            : $this->model;\n\n        // Non-existent models cannot use translatable features\n        if (!$this->model->exists) {\n            $this->useTranslatable = false;\n        }\n\n        return $this->model;\n    }\n\n    /**","sourceCodeStart":361,"sourceCodeEnd":397,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/backend/widgets/Form.php#L361-L397","documentation":"Error \"Form behavior used in :class does not have a model defined.\" thrown in octobercms/october.","triggerScenarios":"Thrown at modules/backend/widgets/Form.php:379 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"}