{"record":{"id":"ca6347eed445e30e","repo":"octobercms/october","slug":"record-with-they-key-key-is-not-found-in-the-dat","errorCode":null,"errorMessage":"Record with they key {key} is not found in the data set","messagePattern":"Record with they key (.+?) is not found in the data set","errorType":"console","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"modules/backend/widgets/table/assets/js/table.datasource.client.js","lineNumber":103,"sourceCode":"\n        this.getRecords(offset, count, onSuccess)\n    }\n\n    /*\n     * Updates a record with the specified key with the passed data\n     *\n     * - key - the record key in the dataset (primary key, etc)\n     * - recordData - the record fields.\n     */\n    Client.prototype.updateRecord = function(key, recordData) {\n        var recordIndex = this.getIndexOfKey(key)\n\n        if (recordIndex !== -1) {\n            recordData[this.tableObj.options.keyColumn] = key\n            this.data[recordIndex] = recordData\n        }\n        else {\n            throw new Error('Record with they key '+key+ ' is not found in the data set')\n        }\n    }\n\n    /*\n     * Deletes a record with the specified key.\n     *\n     * - key - the record key in the dataset (primary key, etc).\n     * - newRecordData - replacement record to add to the dataset if the deletion\n     *   empties it.\n     * - offset - the current page's first record key (zero-based)\n     * - count - number of records to return\n     * - onSuccess - a callback function to execute when the updated data gets available.\n     *\n     * The onSuccess callback parameters: records, totalCount.\n     */\n    Client.prototype.deleteRecord = function(key, newRecordData, offset, count, onSuccess) {\n        var recordIndex = this.getIndexOfKey(key)\n","sourceCodeStart":85,"sourceCodeEnd":121,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/backend/widgets/table/assets/js/table.datasource.client.js#L85-L121","documentation":"updateRecord() in the client memory data source could not find a record with the given key in its in-memory array (getIndexOfKey returned -1), so an update was requested for a row that no longer exists — usually because the row was deleted or the key column value changed earlier in the session.","triggerScenarios":"Thrown at modules/backend/widgets/table/assets/js/table.datasource.client.js:103 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the client-side key column values stay stable while the table is edited","Refresh the table data after deletions so updates target existing keys","Check that options.keyColumn matches the field actually holding the record key"],"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"}