octobercms/october · error · ApplicationException

Limit and pagination parameters cannot be both set.

Error message

Limit and pagination parameters cannot be both set.

What it means

ApplicationException from ReportDataSourceBase::getData guarding the ReportFetchData request object: the caller set both a row limit and pagination parameters, which are mutually exclusive ways of bounding the result set. It signals a malformed fetch request — only one of limit or paginationParams may be supplied.

Solutions

  1. Send only one of limit or paginationParams from the report widget
  2. Normalize request data before calling getData
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at modules/dashboard/classes/ReportDataSourceBase.php:60 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/720f02770d0b824b. Report an issue: GitHub.

Appendix: source

Thrown at modules/dashboard/classes/ReportDataSourceBase.php:60

    ];

    /**
     * @var ReportDimension[]|null Cache of registered dimensions.
     */
    private $dimensions = null;

    /**
     * @var ReportMetric[] Cache of common registered metrics.
     */
    private $metrics = [];

    /**
     * getData returns the data for the specified report.
     */
    public function getData(ReportFetchData $data): ReportFetchDataResult
    {
        if ($data->limit !== null && $data->paginationParams) {
            throw new ApplicationException('Limit and pagination parameters cannot be both set.');
        }

        if (($data->dateStart || $data->dateEnd) && $data->startTimestamp !== null) {
            throw new ApplicationException('Start and end dates cannot be set if the start timestamp is also set.');
        }

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

        $dimension = ReportDimension::findDimensionByCode(
            $this->getAvailableDimensions(),
            $data->dimensionCode
        );

        $metrics = [];
        foreach ($data->metricCodes as $metricCode) {
            $metric = ReportMetric::findMetricByCodeStrict(

View on GitHub (pinned to b608633a7e)