octobercms/october · error · ApplicationException

Either the start and end dates or the start timestamp must b

Error message

Either the start and end dates or the start timestamp must be set.

What it means

Error "Either the start and end dates or the start timestamp must be set." thrown in octobercms/october.

Source

Thrown at modules/dashboard/classes/ReportDataQueryBuilder.php:172

        ReportDataOrderRule $orderRule,
        ?array $dimensionFilters,
        ?int $limit,
        ?ReportDataPaginationParams $paginationParams,
        ?string $groupInterval,
        bool $hideEmptyDimensionValues,
        ?Carbon $startDate,
        ?Carbon $endDate,
        ?int $startTimestamp,
        ?string $dateColumnName,
        ?string $timestampColumnName,
        bool $totalsOnly
    ) {
        if (($startDate || $endDate) && $startTimestamp !== null) {
            throw new ApplicationException('Start and end dates cannot be set if the start timestamp is also set.');
        }

        if (!$startDate && $startTimestamp === null) {
            throw new ApplicationException('Either the start and end dates or the start timestamp must be set.');
        }

        $this->tableName = $tableName;
        $this->metrics = $metrics;
        $this->dimension = $dimension;
        $this->limit = $limit;
        $this->orderRule = $orderRule;
        $this->dimensionFilters = $dimensionFilters;
        $this->groupInterval = $groupInterval;
        $this->hideEmptyDimensionValues = $hideEmptyDimensionValues;
        $this->paginationParams = $paginationParams;
        $this->startDate = $startDate;
        $this->endDate = $endDate;
        $this->dateColumnName = $dateColumnName;
        $this->totalsOnly = $totalsOnly;
        $this->startTimestamp = $startTimestamp;
        $this->timestampColumnName = $timestampColumnName;
    }

View on GitHub (pinned to b608633a7e)

When it happens

Trigger: Thrown at modules/dashboard/classes/ReportDataQueryBuilder.php:172 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/36b4e21008bf2ff5. Report an issue: GitHub.