octobercms/october · error · Error

New row is not found in the updated table

Error message

New row is not found in the updated table: {recordData[keyColumn]}

What it means

Thrown in the createRecord success callback after the table re-renders: the data source returned successfully, but no rendered row matches the new record's client-side key (a negative counter keyed as recordData[keyColumn]). The mismatch means the server response records did not preserve the temporary client key, so findRowByKey fails on freshly built DOM.

Solutions

  1. Ensure the data source echoes back the client-supplied key value (or maps it) so the re-rendered row can be matched
  2. Implement findRowByKey fallback matching on row position or another unique column
  3. Inspect the dataSource.createRecord success handler to confirm records array actually includes the new row
Defensive patterns

Strategy: fallback

When it happens

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

Appendix: source

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

        var keyColumn = this.options.keyColumn,
            recordData = {},
            self = this;

        recordData[keyColumn] = -1 * this.recordsAddedOrDeleted;

        this.$el.trigger('oc.tableNewRow', [
            recordData
        ]);

        this.dataSource.createRecord(recordData, placement, relativeToKey,
            this.navigation.getPageFirstRowOffset(),
            this.options.recordsPerPage,
            function onAddRecordDataTableSuccess(records, totalCount) {
                self.buildDataTable(records, totalCount);

                var row = self.findRowByKey(recordData[keyColumn]);
                if (!row) {
                    throw new Error('New row is not found in the updated table: '+recordData[keyColumn]);
                }

                if (!noFocus) {
                    self.navigation.focusCell(row, 0);
                }

                self = null;
            }
        )
    }

    Table.prototype.deleteRecord = function() {
        if (!this.activeCell) {
            return;
        }

        var self = this,
            key = this.getCellRowKey(this.activeCell),

View on GitHub (pinned to b608633a7e)