octobercms/october · error · ApplicationException
Invalid interval:
Error message
Invalid interval:
What it means
Fallback branch in ReportDateDataSet::getAggregationSetName: the interval string did not match any GROUP_INTERVAL_* constant, so no aggregation bucket key can be computed. Indicates an unsupported interval reaching the aggregation stage.
Solutions
- Pass a ReportDataSourceBase::GROUP_INTERVAL_* value
- Validate the interval before feeding the date data set
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at modules/dashboard/classes/ReportDateDataSet.php:265 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/93f0886c15400a30.
Report an issue: GitHub.
Appendix: source
Thrown at modules/dashboard/classes/ReportDateDataSet.php:265
private function getAggregationSetName(Carbon $date, string $interval)
{
switch ($interval) {
case ReportDataSourceBase::GROUP_INTERVAL_FULL:
return 'all';
case ReportDataSourceBase::GROUP_INTERVAL_DAY:
return $date->toDateString();
case ReportDataSourceBase::GROUP_INTERVAL_WEEK:
$date->startOfWeek(Carbon::MONDAY);
return $date->toDateString();
case ReportDataSourceBase::GROUP_INTERVAL_MONTH:
return $date->startOfMonth()->toDateString();
case ReportDataSourceBase::GROUP_INTERVAL_QUARTER:
return $date->startOfQuarter()->toDateString();
case ReportDataSourceBase::GROUP_INTERVAL_YEAR:
return $date->startOfYear()->toDateString();
default:
throw new ApplicationException('Invalid interval: '.$interval);
}
}
private function getMetricAggregateFunctions(): array
{
$result = [];
foreach ($this->metrics as $metric) {
$function = $metric->getAggregateFunction();
$result[$metric->getDataSetColumName()] = $function;
}
return $result;
}
private function addMetricValuesToAggregationSet(
object $aggregationSet,
array $columnNames,
array $metricAggregateFunctions,View on GitHub (pinned to b608633a7e)