{"record":{"id":"f24ee8b98ca2679c","repo":"octobercms/october","slug":"the-selected-class-doesn-t-exist","errorCode":null,"errorMessage":"The selected class doesn't exist.","messagePattern":"The selected class doesn't exist\\.","errorType":"exception","errorClass":"ApplicationException","httpStatus":null,"severity":"error","filePath":"modules/backend/widgets/ReportContainer.php","lineNumber":254,"sourceCode":"\n    /**\n     * onAddWidget\n     */\n    public function onAddWidget()\n    {\n        if (!$this->showAddRemove) {\n            throw new ForbiddenException;\n        }\n\n        $className = trim(Request::input('className'));\n        $size = trim(Request::input('size'));\n\n        if (!$className) {\n            throw new ApplicationException(\"Please select a widget to add.\");\n        }\n\n        if (!class_exists($className)) {\n            throw new ApplicationException(\"The selected class doesn't exist.\");\n        }\n\n        $widget = new $className($this->controller);\n        if (!($widget instanceof \\Backend\\Classes\\ReportWidgetBase)) {\n            throw new ApplicationException(\"The selected class is not a report widget.\");\n        }\n\n        $widgetInfo = $this->addWidget($widget, $size);\n\n        return [\n            '@#'.$this->getId('container-list') => $this->makePartial('widget', [\n                'widget' => $widget,\n                'widgetAlias' => $widgetInfo['alias'],\n                'sortOrder' => $widgetInfo['sortOrder']\n            ])\n        ];\n    }\n","sourceCodeStart":236,"sourceCodeEnd":272,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/backend/widgets/ReportContainer.php#L236-L272","documentation":"Error \"The selected class doesn't exist.\" thrown in octobercms/october.","triggerScenarios":"Thrown at modules/backend/widgets/ReportContainer.php:254 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"}