{"record":{"id":"94c3e1f0c39ad681","repo":"octobercms/october","slug":"invalid-data-attribute-type-supported-types","errorCode":null,"errorMessage":"Invalid data attribute type. Supported types: ","messagePattern":"Invalid data attribute type\\. Supported types: ","errorType":"exception","errorClass":"ApplicationException","httpStatus":null,"severity":"error","filePath":"modules/dashboard/classes/ReportDataOrderRule.php","lineNumber":36,"sourceCode":"\n    /**\n     * __construct a report data order rule.\n     * @param string $dataAttributeType Specifies the data attribute type.\n     * One of the ATTR_TYPE_* constants.\n     * @param string $attributeName Specifies the attribute name, e.g. a metric code.\n     * Must not be null if the data attribute type is ATTR_TYPE_DIMENSION_FIELD or ATTR_TYPE_METRIC.\n     * Must be null if the data attribute type is ATTR_TYPE_DIMENSION.\n     * @param bool $isAscending Specifies if the order is ascending or descending.\n     */\n    public function __construct(string $dataAttributeType, ?string $attributeName = null, bool $isAscending = true)\n    {\n        $knownAttributeTypes = [\n            self::ATTR_TYPE_DIMENSION,\n            self::ATTR_TYPE_METRIC,\n            self::ATTR_TYPE_DIMENSION_FIELD\n        ];\n        if (!in_array($dataAttributeType, $knownAttributeTypes)) {\n            throw new ApplicationException('Invalid data attribute type. Supported types: ' . implode(', ', $knownAttributeTypes));\n        }\n\n        if (!$attributeName && $dataAttributeType !== self::ATTR_TYPE_DIMENSION) {\n            throw new ApplicationException('Attribute name cannot be empty for ' . $dataAttributeType . ' data attribute type.');\n        }\n\n        if ($attributeName && $dataAttributeType === self::ATTR_TYPE_DIMENSION) {\n            throw new ApplicationException('Attribute name must be empty for ' . self::ATTR_TYPE_DIMENSION . ' data attribute type.');\n        }\n\n        if ($dataAttributeType === self::ATTR_TYPE_DIMENSION_FIELD) {\n            ReportDimensionField::validateCode($attributeName);\n        }\n\n        $this->dataAttributeType = $dataAttributeType;\n        $this->attributeName = $attributeName;\n        $this->isAscending = $isAscending;\n    }","sourceCodeStart":18,"sourceCodeEnd":54,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/dashboard/classes/ReportDataOrderRule.php#L18-L54","documentation":"Error \"Invalid data attribute type. Supported types: \" thrown in octobercms/october.","triggerScenarios":"Thrown at modules/dashboard/classes/ReportDataOrderRule.php:36 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b608633a7e8922487d91a8161499020121c3b3bf","analyzedAt":"2026-08-21T04:24:57.515Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}