{"record":{"id":"fee92cd7b7185d20","repo":"octobercms/october","slug":"inspector-container-containerholder-data-inspe","errorCode":null,"errorMessage":"Inspector container ${$containerHolder.data['inspector-container']} element is not found.","messagePattern":"Inspector container (.+?) element is not found\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"modules/backend/assets/foundation/controls/inspector/inspector.manager.js","lineNumber":32,"sourceCode":"        this.init();\n    }\n\n    InspectorManager.prototype = Object.create(BaseProto);\n    InspectorManager.prototype.constructor = Base;\n\n    InspectorManager.prototype.init = function() {\n        $(document).on('click', '[data-inspectable]', this.proxy(this.onInspectableClicked));\n    }\n\n    InspectorManager.prototype.getContainerElement = function($element) {\n        var $containerHolder = $element.closest('[data-inspector-container]');\n        if ($containerHolder.length === 0) {\n            return null;\n        }\n\n        var $container = $containerHolder.find($containerHolder.data('inspector-container'));\n        if ($container.length === 0) {\n            throw new Error('Inspector container ' + $containerHolder.data['inspector-container'] + ' element is not found.');\n        }\n\n        return $container;\n    }\n\n    InspectorManager.prototype.loadElementOptions = function($element) {\n        var options = {};\n\n        // Only specific options are allowed, don't load all options with data()\n        if ($element.data('inspector-css-class')) {\n            options.inspectorCssClass = $element.data('inspector-css-class');\n        }\n\n        return options;\n    }\n\n    InspectorManager.prototype.createInspectorPopup = function($element, containerSupported) {\n        var options = $.extend(this.loadElementOptions($element), {","sourceCodeStart":14,"sourceCodeEnd":50,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/backend/assets/foundation/controls/inspector/inspector.manager.js#L14-L50","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Pass null (or omit the argument) when ordering by dimension: `new ReportDataOrderRule(ReportDataOrderRule::ATTR_TYPE_DIMENSION)`.","If you meant to order by a specific field of a dimension, switch the type to ATTR_TYPE_DIMENSION_FIELD and keep the name.","Normalize before constructing: null out the name whenever the type is dimension."],"exampleFix":"// before\nnew ReportDataOrderRule(ReportDataOrderRule::ATTR_TYPE_DIMENSION, 'country');\n\n// after\nnew ReportDataOrderRule(ReportDataOrderRule::ATTR_TYPE_DIMENSION, null);\n// or, to order by a specific field:\nnew ReportDataOrderRule(ReportDataOrderRule::ATTR_TYPE_DIMENSION_FIELD, 'country');","handlingStrategy":"validation","validationCode":"// Normalize before constructing: dimension must carry no name\nuse Dashboard\\Classes\\ReportDataOrderRule;\n\nif ($type === ReportDataOrderRule::ATTR_TYPE_DIMENSION) {\n    $name = null;\n}\nreturn new ReportDataOrderRule($type, $name);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never forward a blanket attribute name to every rule — null it out for dimension.","When migrating stored rules to dimension type, clear their attribute names.","Choose ATTR_TYPE_DIMENSION_FIELD when you actually need to name a field."],"tags":["october-cms","dashboard","reports","validation","constructor"],"backgroundTag":"parameter-constraint-violation","analyzedSha":"b608633a7e8922487d91a8161499020121c3b3bf","analyzedAt":"2026-08-21T04:24:57.515Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}