octobercms/october · error · ApplicationException
Invalid aggregate function:
Error message
Invalid aggregate function:
What it means
Error "Invalid aggregate function: " thrown in octobercms/october.
Source
Thrown at modules/dashboard/classes/ReportDataQueryBuilder.php:443
return 'max(%1$s)';
break;
case ReportMetric::AGGREGATE_MIN:
return 'min(%1$s)';
break;
case ReportMetric::AGGREGATE_SUM:
return 'sum(%1$s)';
break;
case ReportMetric::AGGREGATE_COUNT_DISTINCT:
return 'count(distinct %1$s)';
break;
case ReportMetric::AGGREGATE_COUNT_DISTINCT_NOT_NULL:
return 'count(distinct case when %1$s is not null then %1$s end)';
break;
case ReportMetric::AGGREGATE_NONE:
return '%1$s';
break;
default:
throw new ApplicationException('Invalid aggregate function: ' . $function);
}
}
/**
* evalDbObjectName is a point to check object names for validity
*/
protected function evalDbObjectName(string $name)
{
return trim($name);
}
/**
* applyOrderRule
*/
protected function applyOrderRule(QueryBuilder $query)
{
$columnName = null;
$dataAttributeType = $this->orderRule->getDataAttributeType();View on GitHub (pinned to b608633a7e)
When it happens
Trigger: Thrown at modules/dashboard/classes/ReportDataQueryBuilder.php:443 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of octobercms/october@b608633a7e (2026-08-21).
Data as JSON: /api/errors/70a4e0398963f8fb.
Report an issue: GitHub.