{"record":{"id":"5373fdfcb3ef837c","repo":"octobercms/october","slug":"report-reportname-is-not-registered","errorCode":null,"errorMessage":"Report [{$reportName}] is not registered","messagePattern":"Report \\[(.+?)\\] is not registered","errorType":"exception","errorClass":"SystemException","httpStatus":null,"severity":"error","filePath":"modules/dashboard/widgets/dash/HasWidgetData.php","lineNumber":109,"sourceCode":"\n        return ajax()->force(['data' => $data]);\n    }\n\n    /**\n     * onGetWidgetStaticContent\n     */\n    public function onGetWidgetStaticContent()\n    {\n        $widgetConfig = (array) post('widget_config');\n        $reportName = $widgetConfig['reportName'] ?? null;\n        if (!isset($widgetConfig['type']) || $widgetConfig['type'] !== 'static') {\n            return false;\n        }\n\n        $widget = $this->getConfiguredReportWidget();\n        if (!$widget) {\n            $reportName = post('widget_config.reportName');\n            throw new SystemException(\"Report [{$reportName}] is not registered\");\n        }\n\n        $properties = $this->getWidgetPropertiesForBrowser($widget);\n\n        return ajax()->force([\n            'result' => $widget->render(),\n            'properties' => $properties\n        ]);\n    }\n\n    /**\n     * getWidgetPropertiesForBrowser\n     */\n    protected function getWidgetPropertiesForBrowser($widget): array\n    {\n        $result = [];\n        $properties = $widget->defineProperties();\n","sourceCodeStart":91,"sourceCodeEnd":127,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/dashboard/widgets/dash/HasWidgetData.php#L91-L127","documentation":"HasWidgetData::onGetWidgetStaticContent serves the rendered output of a static dashboard widget. After confirming widget_config.type === 'static', it builds the widget via getConfiguredReportWidget() (cache lookup by reportName, then makeDashReportWidget). If that still yields nothing, it re-reads widget_config.reportName from POST and throws this SystemException, meaning the posted report configuration does not correspond to a registered/constructible report widget.","triggerScenarios":"AJAX request to onGetWidgetStaticContent with type: 'static' where reportName is not a known report and the widget/widgetClass in widget_config cannot be resolved; saved dashboard definition referencing a removed or renamed static widget; payload missing both a resolvable reportName and a widget class.","commonSituations":"Definitions copied between environments where the target widget plugin is absent; a static widget deleted from code while old definitions remain in the database; front-end sends only reportName for a widget that was never registered.","solutions":["Ensure widget_config contains a valid widget/widgetClass for the static report, or a reportName that exists in the dashboard definition.","Re-register or reinstall the plugin that provides the static widget.","Clean up stale saved dashboard definitions that reference removed widgets.","Send the full widget_config object the dashboard originally created for the widget."],"exampleFix":"// before\n$.request('onGetWidgetStaticContent', { data: { widget_config: { type: 'static', reportName: 'old_note' } } });\n\n// after\n$.request('onGetWidgetStaticContent', { data: { widget_config: { type: 'static', reportName: 'note', widget: 'MyPlugin\\ReportWidgets\\NoteWidget' } } });","handlingStrategy":"validation","validationCode":"$widgetConfig = (array) post('widget_config');\n$known = $dash->getReportWidget($widgetConfig['reportName'] ?? '') !== null\n    || isset($widgetConfig['widget'], $widgetConfig['widgetClass']);\nif (!$known) {\n    throw new \\ValidationException(['reportName' => 'Unknown report widget']);\n}","typeGuard":null,"tryCatchPattern":"try {\n    $result = $dash->onGetWidgetStaticContent();\n} catch (\\SystemException $e) {\n    // stale definition: log and hide the static widget instead of crashing the dashboard\n    \\Log::warning($e->getMessage());\n    return ['result' => '', 'properties' => []];\n}","preventionTips":["Keep widget_config self-contained (reportName plus widget class) when saving static widgets.","Purge saved definitions that reference unregistered widgets during plugin uninstall.","Validate definitions after plugin upgrades before the dashboard renders."],"tags":["dashboard","widget-registration","static-content","config"],"backgroundTag":"widget-not-registered","analyzedSha":"b608633a7e8922487d91a8161499020121c3b3bf","analyzedAt":"2026-08-21T04:24:57.515Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}