{"record":{"id":"669a9b8ea702c41f","repo":"octobercms/october","slug":"the-oc-table-datasource-namespace-is-not-defined-669a9b","errorCode":null,"errorMessage":"The $.oc.table.datasource namespace is not defined. Make sure that the table.datasource.base.js script is loaded.","messagePattern":"The \\$\\.oc\\.table\\.datasource namespace is not defined\\. Make sure that the table\\.datasource\\.base\\.js script is loaded\\.","errorType":"console","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"modules/backend/widgets/table/assets/js/table.datasource.server.js","lineNumber":13,"sourceCode":"/*\n * Server memory data source for the table control.\n */\n+function ($) { \"use strict\";\n\n    // NAMESPACE CHECK\n    // ============================\n\n    if ($.oc.table === undefined)\n        throw new Error(\"The $.oc.table namespace is not defined. Make sure that the table.js script is loaded.\");\n\n    if ($.oc.table.datasource === undefined)\n        throw new Error(\"The $.oc.table.datasource namespace is not defined. Make sure that the table.datasource.base.js script is loaded.\");\n\n    // CLASS DEFINITION\n    // ============================\n\n    var Base = $.oc.table.datasource.base,\n        BaseProto = Base.prototype\n\n    var Server = function(tableObj) {\n        Base.call(this, tableObj)\n\n        var dataString = tableObj.getElement().getAttribute('data-data')\n\n        if (dataString === null || dataString === undefined)\n            throw new Error('The required data-data attribute is not found on the table control element.')\n\n        this.data = JSON.parse(dataString)\n    };\n","sourceCodeStart":1,"sourceCodeEnd":31,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/backend/widgets/table/assets/js/table.datasource.server.js#L1-L31","documentation":"Sentinel namespace check at the top of the table server data source IIFE: $.oc.table exists but $.oc.table.datasource does not, meaning the shared base data source file table.datasource.base.js was not loaded before this derived data source.","triggerScenarios":"Thrown at modules/backend/widgets/table/assets/js/table.datasource.server.js:13 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Load table.datasource.base.js before table.datasource.server.js","Use the framework's asset bundle ordering","Verify table.datasource.base.js loaded without errors"],"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"}