octobercms/october · error · Error

The table client-side data source class

Error message

The table client-side data source class "{dataSourceClass}" is not found in the $.oc.table.datasource namespace.

What it means

createDataSource() on the client side could not resolve options.clientDataSourceClass inside the $.oc.table.datasource namespace: the configured class name does not match any registered data source (e.g. 'client' or 'server' classes were not loaded or the name is misspelled).

Solutions

  1. Set clientDataSourceClass to a valid name such as 'client' or 'server' matching the registered data sources
  2. Ensure table.datasource.base.js and the specific data source script are loaded so the class exists in the namespace
  3. For custom data sources, register them on $.oc.table.datasource before the table initializes
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at modules/backend/widgets/table/assets/js/table.js:149 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/466205bcd76b9466. Report an issue: GitHub.

Appendix: source

Thrown at modules/backend/widgets/table/assets/js/table.js:149

            var column = this.options.columns[i].key

            this.cellProcessors[column].dispose()
            this.cellProcessors[column] = null
        }

        this.cellProcessors = null
        this.activeCellProcessor = null
    }

    Table.prototype.setColumnConfiguration = function(column, options) {
        this.cellProcessors[column].columnConfiguration = { ...this.cellProcessors[column].columnConfiguration || {}, ...options };
    }

    Table.prototype.createDataSource = function() {
        var dataSourceClass = this.options.clientDataSourceClass

        if ($.oc.table.datasource === undefined || $.oc.table.datasource[dataSourceClass] == undefined)
            throw new Error('The table client-side data source class "'+dataSourceClass+'" is not ' +
                'found in the $.oc.table.datasource namespace.')

        this.dataSource = new $.oc.table.datasource[dataSourceClass](this)
    }

    Table.prototype.registerHandlers = function() {
        this.el.addEventListener('click', this.clickHandler);
        this.el.addEventListener('keydown', this.keydownHandler);
        this.$el.one('dispose-control', this.disposeBound);

        document.addEventListener('click', this.documentClickHandler);

        if (this.options.postback && this.options.clientDataSourceClass == 'client') {
            this.$el.closest('form').bind('oc.beforeRequest', this.formSubmitHandler);
        }

        var toolbar = this.getToolbar();
        if (toolbar) {

View on GitHub (pinned to b608633a7e)