octobercms/october · error · ApplicationException

Start and end dates cannot be set if the start timestamp is

Error message

Start and end dates cannot be set if the start timestamp is also set.

What it means

Error "Start and end dates cannot be set if the start timestamp is also set." thrown in octobercms/october.

Source

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

    public function __construct(
        string $tableName,
        ReportDimension $dimension,
        array $metrics,
        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;

View on GitHub (pinned to b608633a7e)

When it happens

Trigger: Thrown at modules/dashboard/classes/ReportDataQueryBuilder.php:168 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/2c481e42133578ba. Report an issue: GitHub.