octobercms/october · error · ApplicationException

Data source handler method doesn't exist

Error message

Data source handler method doesn't exist 

What it means

Guard in ReportDataSourceBase::runHandler: the handler name passes the on* naming check but no such method exists on the data source class — the client requested a handler the data source does not implement.

Solutions

  1. Implement the handler method on the data source
  2. Fix typos in the handler name requested by the frontend
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at modules/dashboard/classes/ReportDataSourceBase.php:158 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/262b905c3987a94a. Report an issue: GitHub.

Appendix: source

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

     */
    public function getAvailableMetrics(): array
    {
        return $this->metrics;
    }

    /**
     * runHandler runs a data source event handler.
     * @param string $handlerName The name of the handler.
     * @return mixed The data to pass to the client-side handler caller.
     */
    public function runHandler(string $handlerName)
    {
        if (!preg_match('/^on/i', $handlerName)) {
            throw new ApplicationException('Invalid data source handler name ' . $handlerName);
        }

        if (!method_exists($this, $handlerName)) {
            throw new ApplicationException('Data source handler method doesn\'t exist ' . $handlerName);
        }

        return $this->$handlerName();
    }

    /**
     * registerDimension registers a new dimension.
     * @param ReportDimension $dimension Dimension to register
     * @return ReportDimension Returns the added dimension, for chaining
     */
    protected function registerDimension(ReportDimension $dimension): ReportDimension
    {
        if ($this->dimensions === null) {
            $this->dimensions = [];
        }

        $knownDimension = array_filter(
            $this->dimensions,

View on GitHub (pinned to b608633a7e)