{"record":{"id":"3f64e3c98c4fc578","repo":"octobercms/october","slug":"unable-to-find-the-active-theme","errorCode":null,"errorMessage":"Unable to find the active theme.","messagePattern":"Unable to find the active theme\\.","errorType":"exception","errorClass":"ApplicationException","httpStatus":null,"severity":"error","filePath":"modules/cms/models/MaintenanceSetting.php","lineNumber":91,"sourceCode":"    {\n        if (!System::hasDatabase()) {\n            return false;\n        }\n\n        if (BackendAuth::userHasAccess('general.backend.view_offline')) {\n            return false;\n        }\n\n        return self::get('is_enabled', false);\n    }\n\n    /**\n     * getCmsPageOptions\n     */\n    public function getCmsPageOptions()\n    {\n        if (!$theme = $this->findTargetTheme()) {\n            throw new ApplicationException('Unable to find the active theme.');\n        }\n\n        return array_map(function($code) use ($theme) {\n            return \"{$theme->getDirName()}/{$code}\";\n        }, Page::listInTheme($theme)->lists('fileName', 'fileName'));\n    }\n\n    /**\n     * beforeValidate ensures each theme has its own CMS page, store it inside a mapping array.\n     */\n    public function beforeValidate()\n    {\n        if (!$theme = $this->findTargetTheme()) {\n            throw new ApplicationException('Unable to find the active theme.');\n        }\n\n        $themeMap = (array) $this->theme_map;\n        $themeMap[$theme->getDirName()] = $this->cms_page;","sourceCodeStart":73,"sourceCodeEnd":109,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/cms/models/MaintenanceSetting.php#L73-L109","documentation":"Error \"Unable to find the active theme.\" thrown in octobercms/october.","triggerScenarios":"Thrown at modules/cms/models/MaintenanceSetting.php:91 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"}