octobercms/october · error · ApplicationException

Invalid data attribute type. Supported types:

Error message

Invalid data attribute type. Supported types: 

What it means

Error "Invalid data attribute type. Supported types: " thrown in octobercms/october.

Source

Thrown at modules/dashboard/classes/ReportDataOrderRule.php:36

    /**
     * __construct a report data order rule.
     * @param string $dataAttributeType Specifies the data attribute type.
     * One of the ATTR_TYPE_* constants.
     * @param string $attributeName Specifies the attribute name, e.g. a metric code.
     * Must not be null if the data attribute type is ATTR_TYPE_DIMENSION_FIELD or ATTR_TYPE_METRIC.
     * Must be null if the data attribute type is ATTR_TYPE_DIMENSION.
     * @param bool $isAscending Specifies if the order is ascending or descending.
     */
    public function __construct(string $dataAttributeType, ?string $attributeName = null, bool $isAscending = true)
    {
        $knownAttributeTypes = [
            self::ATTR_TYPE_DIMENSION,
            self::ATTR_TYPE_METRIC,
            self::ATTR_TYPE_DIMENSION_FIELD
        ];
        if (!in_array($dataAttributeType, $knownAttributeTypes)) {
            throw new ApplicationException('Invalid data attribute type. Supported types: ' . implode(', ', $knownAttributeTypes));
        }

        if (!$attributeName && $dataAttributeType !== self::ATTR_TYPE_DIMENSION) {
            throw new ApplicationException('Attribute name cannot be empty for ' . $dataAttributeType . ' data attribute type.');
        }

        if ($attributeName && $dataAttributeType === self::ATTR_TYPE_DIMENSION) {
            throw new ApplicationException('Attribute name must be empty for ' . self::ATTR_TYPE_DIMENSION . ' data attribute type.');
        }

        if ($dataAttributeType === self::ATTR_TYPE_DIMENSION_FIELD) {
            ReportDimensionField::validateCode($attributeName);
        }

        $this->dataAttributeType = $dataAttributeType;
        $this->attributeName = $attributeName;
        $this->isAscending = $isAscending;
    }

View on GitHub (pinned to b608633a7e)

When it happens

Trigger: Thrown at modules/dashboard/classes/ReportDataOrderRule.php:36 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/94c3e1f0c39ad681. Report an issue: GitHub.