octobercms/october · error · SystemException
Report [{$reportName}] is not registered
Error message
Report [{$reportName}] is not registered What it means
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.
Source
Thrown at modules/dashboard/widgets/dash/HasWidgetData.php:109
return ajax()->force(['data' => $data]);
}
/**
* onGetWidgetStaticContent
*/
public function onGetWidgetStaticContent()
{
$widgetConfig = (array) post('widget_config');
$reportName = $widgetConfig['reportName'] ?? null;
if (!isset($widgetConfig['type']) || $widgetConfig['type'] !== 'static') {
return false;
}
$widget = $this->getConfiguredReportWidget();
if (!$widget) {
$reportName = post('widget_config.reportName');
throw new SystemException("Report [{$reportName}] is not registered");
}
$properties = $this->getWidgetPropertiesForBrowser($widget);
return ajax()->force([
'result' => $widget->render(),
'properties' => $properties
]);
}
/**
* getWidgetPropertiesForBrowser
*/
protected function getWidgetPropertiesForBrowser($widget): array
{
$result = [];
$properties = $widget->defineProperties();
View on GitHub (pinned to b608633a7e)
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.
Example fix
// before
$.request('onGetWidgetStaticContent', { data: { widget_config: { type: 'static', reportName: 'old_note' } } });
// after
$.request('onGetWidgetStaticContent', { data: { widget_config: { type: 'static', reportName: 'note', widget: 'MyPlugin\ReportWidgets\NoteWidget' } } }); Defensive patterns
Strategy: validation
Validate before calling
$widgetConfig = (array) post('widget_config');
$known = $dash->getReportWidget($widgetConfig['reportName'] ?? '') !== null
|| isset($widgetConfig['widget'], $widgetConfig['widgetClass']);
if (!$known) {
throw new \ValidationException(['reportName' => 'Unknown report widget']);
} Try / catch
try {
$result = $dash->onGetWidgetStaticContent();
} catch (\SystemException $e) {
// stale definition: log and hide the static widget instead of crashing the dashboard
\Log::warning($e->getMessage());
return ['result' => '', 'properties' => []];
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- backend::lang.widget.not_registered
- Unknown widget report interval {$widgetInterval}
- backend::lang.field.invalid_type
- Widget class [{$widgetClass}] not registered.
- Data source [{$dataSourceClass}] class is not registered.
AI-assisted analysis of octobercms/october@b608633a7e (2026-08-21).
Data as JSON: /api/errors/5373fdfcb3ef837c.
Report an issue: GitHub.