octobercms/october · error · Error

Inspector container ${$containerHolder.data['inspector-conta

Error message

Inspector container ${$containerHolder.data['inspector-container']} element is not found.

What it means

The mirror-image rule in ReportDataOrderRule: ATTR_TYPE_DIMENSION orders by the dimension as a whole, so `$attributeName` must be null. Supplying a non-empty name together with ATTR_TYPE_DIMENSION throws this ApplicationException, preventing ambiguous rules that name an attribute the dimension type ignores.

Source

Thrown at modules/backend/assets/foundation/controls/inspector/inspector.manager.js:32

        this.init();
    }

    InspectorManager.prototype = Object.create(BaseProto);
    InspectorManager.prototype.constructor = Base;

    InspectorManager.prototype.init = function() {
        $(document).on('click', '[data-inspectable]', this.proxy(this.onInspectableClicked));
    }

    InspectorManager.prototype.getContainerElement = function($element) {
        var $containerHolder = $element.closest('[data-inspector-container]');
        if ($containerHolder.length === 0) {
            return null;
        }

        var $container = $containerHolder.find($containerHolder.data('inspector-container'));
        if ($container.length === 0) {
            throw new Error('Inspector container ' + $containerHolder.data['inspector-container'] + ' element is not found.');
        }

        return $container;
    }

    InspectorManager.prototype.loadElementOptions = function($element) {
        var options = {};

        // Only specific options are allowed, don't load all options with data()
        if ($element.data('inspector-css-class')) {
            options.inspectorCssClass = $element.data('inspector-css-class');
        }

        return options;
    }

    InspectorManager.prototype.createInspectorPopup = function($element, containerSupported) {
        var options = $.extend(this.loadElementOptions($element), {

View on GitHub (pinned to b608633a7e)

Solutions

  1. Pass null (or omit the argument) when ordering by dimension: `new ReportDataOrderRule(ReportDataOrderRule::ATTR_TYPE_DIMENSION)`.
  2. If you meant to order by a specific field of a dimension, switch the type to ATTR_TYPE_DIMENSION_FIELD and keep the name.
  3. Normalize before constructing: null out the name whenever the type is dimension.

Example fix

// before
new ReportDataOrderRule(ReportDataOrderRule::ATTR_TYPE_DIMENSION, 'country');

// after
new ReportDataOrderRule(ReportDataOrderRule::ATTR_TYPE_DIMENSION, null);
// or, to order by a specific field:
new ReportDataOrderRule(ReportDataOrderRule::ATTR_TYPE_DIMENSION_FIELD, 'country');
Defensive patterns

Strategy: validation

Validate before calling

// Normalize before constructing: dimension must carry no name
use Dashboard\Classes\ReportDataOrderRule;

if ($type === ReportDataOrderRule::ATTR_TYPE_DIMENSION) {
    $name = null;
}
return new ReportDataOrderRule($type, $name);

Prevention

When it happens

Trigger: Calling `new ReportDataOrderRule(ReportDataOrderRule::ATTR_TYPE_DIMENSION, 'country')`; reusing one code path that always passes a name regardless of type; deserializing stored rules whose type was later switched to dimension.

Common situations: Generic sort-rule factories that always forward an attribute name; migrating persisted rules between types; copy-paste from a metric rule with only the type changed.

Related errors


AI-assisted analysis of octobercms/october@b608633a7e (2026-08-21). Data as JSON: /api/errors/fee92cd7b7185d20. Report an issue: GitHub.