{"record":{"id":"8e035a7133a984cc","repo":"octobercms/october","slug":"cannot-find-the-requested-row-group","errorCode":null,"errorMessage":"Cannot find the requested row group.","messagePattern":"Cannot find the requested row group\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"modules/backend/assets/foundation/controls/inspector/inspector.groups.js","lineNumber":101,"sourceCode":"\n    GroupManager.prototype.writeGroupStatuses = function(updatedStatuses) {\n        var statuses = getInspectorGroupStatuses()\n\n        statuses[this.controlId] = updatedStatuses\n        setInspectorGroupStatuses(statuses)\n\n        this.cachedGroupStatuses = updatedStatuses\n    }\n\n    GroupManager.prototype.findGroupByIndex = function(index) {\n        return this.rootGroup.findGroupByIndex(index)\n    }\n\n    GroupManager.prototype.findGroupRows = function(table, index, ignoreCollapsedSubgroups) {\n        var group = this.findGroupByIndex(index)\n\n        if (!group) {\n            throw new Error('Cannot find the requested row group.')\n        }\n\n        return group.findGroupRows(table, ignoreCollapsedSubgroups, this)\n    }\n\n    GroupManager.prototype.markGroupRowInvalid = function(group, table) {\n        var currentGroup = group\n\n        while (currentGroup) {\n            var row = currentGroup.findGroupRow(table)\n            if (row) {\n                $.oc.foundation.element.addClass(row, 'invalid')\n            }\n\n            currentGroup = currentGroup.parentGroup\n        }\n    }\n","sourceCodeStart":83,"sourceCodeEnd":119,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/backend/assets/foundation/controls/inspector/inspector.groups.js#L83-L119","documentation":"ReportDataOrderRule describes a sort rule for dashboard report data. Its constructor whitelists `$dataAttributeType` against exactly three constants — ATTR_TYPE_DIMENSION ('dimension'), ATTR_TYPE_METRIC ('metric'), ATTR_TYPE_DIMENSION_FIELD ('dimension_field') — and throws this ApplicationException (the message appends the supported list) for any other string. Using the class constants instead of raw strings avoids the whole class of mistake.","triggerScenarios":"Constructing `new ReportDataOrderRule('dim')` or `'metrics'` (typo/plural); building rules from user-supplied sort parameters without validating them; passing an attribute *name* where the *type* belongs.","commonSituations":"Mapping HTTP sort parameters straight into the constructor; copying example code with the wrong literal; version changes introducing dimension_field after code was written against two types.","solutions":["Pass one of the class constants: ReportDataOrderRule::ATTR_TYPE_DIMENSION, ATTR_TYPE_METRIC or ATTR_TYPE_DIMENSION_FIELD.","Validate/whitelist user input against the same list before constructing the rule.","Check for typos and plurals ('metric' not 'metrics', 'dimension' not 'dim')."],"exampleFix":"// before\nnew ReportDataOrderRule('dim');\n\n// after\nnew ReportDataOrderRule(ReportDataOrderRule::ATTR_TYPE_DIMENSION);","handlingStrategy":"type-guard","validationCode":"// Whitelist before constructing\nuse Dashboard\\Classes\\ReportDataOrderRule;\n$allowed = [\n    ReportDataOrderRule::ATTR_TYPE_DIMENSION,\n    ReportDataOrderRule::ATTR_TYPE_METRIC,\n    ReportDataOrderRule::ATTR_TYPE_DIMENSION_FIELD,\n];\n$type = (string) request()->input('order_type');\nif (!in_array($type, $allowed, true)) {\n    throw new ValidationException(['order_type' => 'Unsupported sort type']);\n}\nreturn new ReportDataOrderRule($type, $name);","typeGuard":"/**\n * @param mixed $type\n * @returns {boolean}\n */\nfunction isKnownAttrType($type)\n{\n    return is_string($type) && in_array($type, [\n        \\Dashboard\\Classes\\ReportDataOrderRule::ATTR_TYPE_DIMENSION,\n        \\Dashboard\\Classes\\ReportDataOrderRule::ATTR_TYPE_METRIC,\n        \\Dashboard\\Classes\\ReportDataOrderRule::ATTR_TYPE_DIMENSION_FIELD,\n    ], true);\n}","tryCatchPattern":null,"preventionTips":["Always construct rules with the ATTR_TYPE_* constants, never raw strings.","Validate any sort type coming from HTTP against the constants before building order rules.","The error message itself lists the three valid values — read it before guessing."],"tags":["october-cms","dashboard","reports","validation","enum"],"backgroundTag":"invalid-enum-value","analyzedSha":"b608633a7e8922487d91a8161499020121c3b3bf","analyzedAt":"2026-08-21T04:24:57.515Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}