{"record":{"id":"24f9108771410e95","repo":"octobercms/october","slug":"cannot-find-th-element-for-the-inspector-row","errorCode":null,"errorMessage":"Cannot find TH element for the Inspector row","messagePattern":"Cannot find TH element for the Inspector row","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"modules/backend/assets/foundation/controls/inspector/inspector.surface.js","lineNumber":405,"sourceCode":"            row.setAttribute('data-group-index', this.getGroupManager().getGroupIndex(group))\n            row.setAttribute('data-parent-group-index', this.getGroupManager().getGroupIndex(group.parentGroup))\n        }\n        else {\n            if (group.parentGroup) {\n                row.setAttribute('data-parent-group-index', this.getGroupManager().getGroupIndex(group))\n            }\n        }\n    }\n\n    Surface.prototype.applyGroupLevelToRow = function(row, group) {\n        if (row.hasAttribute('data-group-level')) {\n            return;\n        }\n\n        var th = this.getRowHeadElement(row);\n\n        if (th === null) {\n            throw new Error('Cannot find TH element for the Inspector row');\n        }\n\n        var groupLevel = group.getLevel();\n\n        row.setAttribute('data-group-level', groupLevel)\n        th.children[0].style.marginLeft = groupLevel*10 + 'px'\n    }\n\n    Surface.prototype.toggleGroup = function(row, forceExpand) {\n        var link = row.querySelector('a'),\n            groupIndex = row.getAttribute('data-group-index'),\n            table = this.getRootTable(),\n            groupManager = this.getGroupManager(),\n            collapse = true\n\n        if ($.oc.foundation.element.hasClass(link, 'expanded') && !forceExpand) {\n            $.oc.foundation.element.removeClass(link, 'expanded')\n        }","sourceCodeStart":387,"sourceCodeEnd":423,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/backend/assets/foundation/controls/inspector/inspector.surface.js#L387-L423","documentation":"Error \"Cannot find TH element for the Inspector row\" thrown in octobercms/october.","triggerScenarios":"Thrown at modules/backend/assets/foundation/controls/inspector/inspector.surface.js:405 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b608633a7e8922487d91a8161499020121c3b3bf","analyzedAt":"2026-08-21T04:24:57.515Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}