{"record":{"id":"a48874909abfbf3a","repo":"octobercms/october","slug":"blueprint-model-class-custommodelclass-must-e","errorCode":null,"errorMessage":"Blueprint Model class [{$customModelClass}] must extend the [{$modelClass}] base class","messagePattern":"Blueprint Model class \\[(.+?)\\] must extend the \\[(.+?)\\] base class","errorType":"exception","errorClass":"SystemException","httpStatus":null,"severity":"error","filePath":"modules/tailor/classes/Blueprint.php","lineNumber":704,"sourceCode":"        }\n\n        return \"entry_{$this->handleSlug}\";\n    }\n\n    /**\n     * newModelInstance returns a new instance of the model associated with this blueprint\n     */\n    public function newModelInstance()\n    {\n        $modelClass = $this->getModelClassName();\n        $customModelClass = $this->modelClass;\n\n        if (!$customModelClass) {\n            return new $modelClass;\n        }\n\n        if (!is_a($customModelClass, $modelClass, true)) {\n            throw new SystemException(\"Blueprint Model class [{$customModelClass}] must extend the [{$modelClass}] base class\");\n        }\n\n        return new $customModelClass;\n    }\n\n    /**\n     * newCollection instance\n     */\n    public function newCollection(array $templates = []): BlueprintCollection\n    {\n        return new BlueprintCollection($templates);\n    }\n\n    /**\n     * getRelativePath returns path relative to the theme template directory\n     */\n    protected function getRelativePath(string $path): string\n    {","sourceCodeStart":686,"sourceCodeEnd":722,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/tailor/classes/Blueprint.php#L686-L722","documentation":"Guard in Blueprint::newModelInstance: the blueprint declares a custom modelClass, but that class does not extend the required base model class (the entry/form model for the blueprint type). The developer's custom model has the wrong inheritance hierarchy.","triggerScenarios":"Thrown at modules/tailor/classes/Blueprint.php:704 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Make the custom model class extend the blueprint's base model class","Remove modelClass to use the default model"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b608633a7e8922487d91a8161499020121c3b3bf","analyzedAt":"2026-08-21T04:24:57.515Z","contentChangedAt":"2026-08-21T04:24:57.515Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}