octobercms/october · error · ApplicationException
Attribute name must be empty for
Error message
Attribute name must be empty for
What it means
Error "Attribute name must be empty for " thrown in octobercms/october.
Source
Thrown at modules/dashboard/classes/ReportDataOrderRule.php:44
* @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;
}
/**
* Creates the order rule from a widget configuration.
* @param string $sortOrder Specifies the sort order, the allowed values are "asc", "desc".
* @param string $sortBy Specifies the data attribute type and code, e.g. "oc_dimension" or "oc_metric-[metric-code]"
*/
public static function createFromWidgetConfig(string $sortOrder, string $sortBy)
{View on GitHub (pinned to b608633a7e)
When it happens
Trigger: Thrown at modules/dashboard/classes/ReportDataOrderRule.php:44 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/ad7e48bc6aaebe51.
Report an issue: GitHub.