octobercms/october · error · SystemException
The Table widget data source is not specified in the…
Error message
The Table widget data source is not specified in the configuration.
What it means
Thrown during Table widget initialization when the 'dataSource' config key is absent or empty. init() resolves which data-source backend (client memory or server event) the widget should use, and without it no records can be loaded or saved.
Solutions
- Set dataSource in the widget's YAML config, e.g. dataSource: client or dataSource: server
- Use one of the built-in aliases ('client' maps to ClientMemoryDataSource, 'server' maps to ServerEventDataSource) or a fully-qualified data source class name
- If configuring programmatically, pass ['dataSource' => 'server'] in the widget's config array
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at modules/backend/widgets/Table.php:71 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of octobercms/october@b608633a7e (2026-08-21).
Data as JSON: /api/errors/ba9f228716e95fc9.
Report an issue: GitHub.
Appendix: source
Thrown at modules/backend/widgets/Table.php:71
protected $dataSourceAliases = [
'client' => \Backend\Widgets\Table\ClientMemoryDataSource::class,
'server' => \Backend\Widgets\Table\ServerEventDataSource::class
];
/**
* Initialize the widget, called by the constructor and free from its parameters.
*/
public function init()
{
$this->columns = $this->getConfig('columns', []);
$this->fieldName = $this->getConfig('fieldName', $this->alias);
$this->recordsKeyFrom = $this->getConfig('keyFrom', 'id');
$dataSourceClass = $this->getConfig('dataSource');
if (!strlen($dataSourceClass)) {
throw new SystemException('The Table widget data source is not specified in the configuration.');
}
if (array_key_exists($dataSourceClass, $this->dataSourceAliases)) {
$dataSourceClass = $this->dataSourceAliases[$dataSourceClass];
}
if (!class_exists($dataSourceClass)) {
throw new SystemException(sprintf('The Table widget data source class "%s" is could not be found.', $dataSourceClass));
}
$this->dataSource = new $dataSourceClass($this->recordsKeyFrom);
// Load data into the client memory data source on POST
if (Request::method() == 'POST' && $this->isClientDataSource()) {
if (strpos($this->fieldName, '[') === false) {
$requestData = post($this->fieldName . 'TableData');
}
else {View on GitHub (pinned to b608633a7e)