{"record":{"id":"7d3a398fde9e3e84","repo":"octobercms/october","slug":"the-selected-class-is-not-a-report-widget","errorCode":null,"errorMessage":"The selected class is not a report widget.","messagePattern":"The selected class is not a report widget\\.","errorType":"exception","errorClass":"ApplicationException","httpStatus":null,"severity":"error","filePath":"modules/backend/widgets/ReportContainer.php","lineNumber":259,"sourceCode":"    {\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\n    /**\n     * onSetWidgetOrders\n     */\n    public function onSetWidgetOrders()\n    {","sourceCodeStart":241,"sourceCodeEnd":277,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/backend/widgets/ReportContainer.php#L241-L277","documentation":"Error \"The selected class is not a report widget.\" thrown in octobercms/october.","triggerScenarios":"Thrown at modules/backend/widgets/ReportContainer.php:259 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"}