{"record":{"id":"0bbd25fcc285b870","repo":"octobercms/october","slug":"invalid-order-rule-data-attribute-type","errorCode":null,"errorMessage":"Invalid order rule data attribute type: ","messagePattern":"Invalid order rule data attribute type: ","errorType":"exception","errorClass":"ApplicationException","httpStatus":null,"severity":"error","filePath":"modules/dashboard/classes/ReportDataQueryBuilder.php","lineNumber":487,"sourceCode":"                }\n                break;\n            case ReportDataOrderRule::ATTR_TYPE_METRIC:\n                $metric = ReportMetric::findMetricByCodeStrict(\n                    $this->metrics,\n                    $this->orderRule->getAttributeName()\n                );\n                $columnName = $metric->getDataSetColumName();\n                break;\n            case ReportDataOrderRule::ATTR_TYPE_DIMENSION_FIELD:\n                $field = $this->dimension->findDimensionFieldByCode(\n                    $this->orderRule->getAttributeName()\n                );\n\n                $columnName = $field->getCode();\n\n                break;\n            default:\n                throw new ApplicationException('Invalid order rule data attribute type: ' . $dataAttributeType);\n                break;\n        }\n\n        $query->orderBy($this->evalDbObjectName($columnName), $this->orderRule->isAscending() ? 'asc' : 'desc');\n    }\n\n    /**\n     * applyFilters\n     */\n    protected function applyFilters(QueryBuilder $query)\n    {\n        if (!$this->dimensionFilters) {\n            return;\n        }\n\n        foreach ($this->dimensionFilters as $dimensionFilter) {\n            $this->applyFilter($query, $dimensionFilter);\n        }","sourceCodeStart":469,"sourceCodeEnd":505,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/dashboard/classes/ReportDataQueryBuilder.php#L469-L505","documentation":"Fallback branch in ReportDataQueryBuilder::applyOrderRule: the order rule's data attribute type is not a recognized ATTR_TYPE_* value, so the sort column cannot be resolved. Indicates an internally inconsistent order rule reaching the query builder.","triggerScenarios":"Thrown at modules/dashboard/classes/ReportDataQueryBuilder.php:487 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Construct the order rule with a valid ATTR_TYPE_* constant","Validate order rules in the data source before invoking the builder"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b608633a7e8922487d91a8161499020121c3b3bf","analyzedAt":"2026-08-21T04:24:57.515Z","contentChangedAt":"2026-08-21T04:24:57.515Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}