{"record":{"id":"54fa54454ede39cb","repo":"octobercms/october","slug":"cannot-preview-without-the-cms-module-installed","errorCode":null,"errorMessage":"Cannot preview without the CMS module installed!","messagePattern":"Cannot preview without the CMS module installed!","errorType":"exception","errorClass":"October\\Rain\\Exception\\ApplicationException","httpStatus":null,"severity":"error","filePath":"modules/tailor/behaviors/PreviewController.php","lineNumber":59,"sourceCode":"     */\n    protected $componentName;\n\n    /**\n     * setPreviewPageContext\n     */\n    public function setPreviewPageContext(string $componentName, Blueprint $activeSource)\n    {\n        $this->componentName = $componentName;\n        $this->activeSource = $activeSource;\n    }\n\n    /**\n     * onPreview previews the record\n     */\n    public function onPreview($recordId = null)\n    {\n        if (!System::hasModule('Cms')) {\n            throw new ApplicationException('Cannot preview without the CMS module installed!');\n        }\n\n        if (!$pageName = $this->getPreviewPageName()) {\n            throw new ApplicationException('There is no page that uses the necessary component');\n        }\n\n        // Get model from page action\n        $model = $this->controller->formGetModel();\n\n        // Update the record for preview\n        $this->performSaveOnModel(\n            $model,\n            $this->controller->formGetWidget()->getSaveData(),\n            $this->controller->formGetWidget()->getSessionKey()\n        );\n\n        // A preview page is already open\n        if ($existingToken = post('preview_token')) {","sourceCodeStart":41,"sourceCodeEnd":77,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/tailor/behaviors/PreviewController.php#L41-L77","documentation":"Error \"Cannot preview without the CMS module installed!\" thrown in octobercms/october.","triggerScenarios":"Thrown at modules/tailor/behaviors/PreviewController.php:59 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"}