octobercms/october · error · Error
Cannot find the requested row group.
Error message
Cannot find the requested row group.
What it means
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.
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').
Example fix
// before
new ReportDataOrderRule('dim');
// after
new ReportDataOrderRule(ReportDataOrderRule::ATTR_TYPE_DIMENSION); Defensive patterns
Strategy: type-guard
Validate before calling
// Whitelist before constructing
use Dashboard\Classes\ReportDataOrderRule;
$allowed = [
ReportDataOrderRule::ATTR_TYPE_DIMENSION,
ReportDataOrderRule::ATTR_TYPE_METRIC,
ReportDataOrderRule::ATTR_TYPE_DIMENSION_FIELD,
];
$type = (string) request()->input('order_type');
if (!in_array($type, $allowed, true)) {
throw new ValidationException(['order_type' => 'Unsupported sort type']);
}
return new ReportDataOrderRule($type, $name); Type guard
/**
* @param mixed $type
* @returns {boolean}
*/
function isKnownAttrType($type)
{
return is_string($type) && in_array($type, [
\Dashboard\Classes\ReportDataOrderRule::ATTR_TYPE_DIMENSION,
\Dashboard\Classes\ReportDataOrderRule::ATTR_TYPE_METRIC,
\Dashboard\Classes\ReportDataOrderRule::ATTR_TYPE_DIMENSION_FIELD,
], true);
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- Cannot switch to container: a container element is not found
- Inspector container element is not found.
- Inspector surface unique ID should be defined.
- Attribute name cannot be empty for
- Dimension is required.
AI-assisted analysis of octobercms/october@b608633a7e (2026-08-21).
Data as JSON: /api/errors/8e035a7133a984cc.
Report an issue: GitHub.
Appendix: source
Thrown at modules/backend/assets/foundation/controls/inspector/inspector.groups.js:101
GroupManager.prototype.writeGroupStatuses = function(updatedStatuses) {
var statuses = getInspectorGroupStatuses()
statuses[this.controlId] = updatedStatuses
setInspectorGroupStatuses(statuses)
this.cachedGroupStatuses = updatedStatuses
}
GroupManager.prototype.findGroupByIndex = function(index) {
return this.rootGroup.findGroupByIndex(index)
}
GroupManager.prototype.findGroupRows = function(table, index, ignoreCollapsedSubgroups) {
var group = this.findGroupByIndex(index)
if (!group) {
throw new Error('Cannot find the requested row group.')
}
return group.findGroupRows(table, ignoreCollapsedSubgroups, this)
}
GroupManager.prototype.markGroupRowInvalid = function(group, table) {
var currentGroup = group
while (currentGroup) {
var row = currentGroup.findGroupRow(table)
if (row) {
$.oc.foundation.element.addClass(row, 'invalid')
}
currentGroup = currentGroup.parentGroup
}
}
View on GitHub (pinned to b608633a7e)