{"record":{"id":"83006ac8356d96b8","repo":"octobercms/october","slug":"the-row-attribute-keycolumn-is-not-set-for-the-r","errorCode":null,"errorMessage":"The row attribute {keyColumn} is not set for the row #{i}","messagePattern":"The row attribute (.+?) is not set for the row #(.+?)","errorType":"console","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"modules/backend/widgets/table/assets/js/table.js","lineNumber":370,"sourceCode":"        for (var i = 0, len = headerCells.length; i < len; i++) {\n            if (dataCells[i]) {\n                dataCells[i].setAttribute('style', headerCells[i].getAttribute('style'));\n            }\n        }\n    }\n\n    Table.prototype.buildDataTable = function(records, totalCount) {\n        var dataTable = document.createElement('table'),\n            tbody = document.createElement('tbody'),\n            keyColumn = this.options.keyColumn\n\n        dataTable.setAttribute('class', 'data')\n\n        for (var i = 0, len = records.length; i < len; i++) {\n            var row = document.createElement('tr')\n\n            if (records[i][keyColumn] === undefined)\n                throw new Error('The row attribute '+keyColumn+' is not set for the row #'+i);\n\n            row.setAttribute('data-row', records[i][keyColumn])\n            for (var j = 0, colsLen = this.options.columns.length; j < colsLen; j++) {\n                var cell = document.createElement('td'),\n                    dataContainer = document.createElement('input'),\n                    cellContentContainer = document.createElement('div'),\n                    column = this.options.columns[j],\n                    columnName = column.key,\n                    cellProcessor = this.getCellProcessor(columnName)\n\n                cell.setAttribute('data-column', columnName)\n                cell.setAttribute('data-column-type', column.type)\n\n                dataContainer.setAttribute('type', 'hidden')\n                dataContainer.setAttribute('data-container', 'data-container')\n                dataContainer.value = this.formatDataContainerValue(records[i][columnName])\n\n                cellContentContainer.setAttribute('class', 'content-container')","sourceCodeStart":352,"sourceCodeEnd":388,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/backend/widgets/table/assets/js/table.js#L352-L388","documentation":"While building the data table DOM, row #i is missing the key column attribute (options.keyColumn), so the widget cannot identify the row's record key. Usually the record data passed to the client does not contain the key column field at all.","triggerScenarios":"Thrown at modules/backend/widgets/table/assets/js/table.js:370 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure every record returned to the table includes the key column field (default 'id')","Verify options.keyColumn matches the actual key field name in the data","Make sure server-side handlers return records keyed with the configured key column"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b608633a7e8922487d91a8161499020121c3b3bf","analyzedAt":"2026-08-21T04:24:57.515Z","contentChangedAt":"2026-08-21T04:24:57.515Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}