{"record":{"id":"7ede96ede6cef919","repo":"octobercms/october","slug":"key-property-keyproperty-is-not-found-in-the-in","errorCode":null,"errorMessage":"Key property ${keyProperty} is not found in the Inspector data. Property: ${this.propertyDefinition.property}","messagePattern":"Key property (.+?) is not found in the Inspector data\\. Property: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"modules/backend/assets/foundation/controls/inspector/inspector.editor.objectlist.js","lineNumber":482,"sourceCode":"\n        $(link).popup('hide')\n        return false\n    }\n\n    ObjectListEditor.prototype.validateKeyValue = function() {\n        if (!this.isKeyValueMode()) {\n            return true\n        }\n\n        if (this.currentRowInspector === null) {\n            return true\n        }\n\n        var data = this.currentRowInspector.getValues(),\n            keyProperty = this.propertyDefinition.keyProperty\n\n        if (data[keyProperty] === undefined) {\n            throw new Error('Key property ' + keyProperty + ' is not found in the Inspector data. Property: ' + this.propertyDefinition.property)\n        }\n\n        var keyPropertyValue = data[keyProperty],\n            keyPropertyTitle = this.getKeyProperty().title\n\n        if (typeof keyPropertyValue !== 'string') {\n            throw new Error('Key property (' + keyProperty + ') value should be a string. Property: ' + this.propertyDefinition.property)\n        }\n\n        if ($.trim(keyPropertyValue).length === 0) {\n            $.oc.flashMsg({text: 'The value of key property ' + keyPropertyTitle + ' cannot be empty.', 'class': 'error', 'interval': 3})\n            return false\n        }\n\n        var selectedRow = this.getSelectedRow(),\n            tbody = this.getTableBody(),\n            dataRows = tbody.querySelectorAll('tr[data-inspector-values]')\n","sourceCodeStart":464,"sourceCodeEnd":500,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/backend/assets/foundation/controls/inspector/inspector.editor.objectlist.js#L464-L500","documentation":"DashController is a controller behavior for dashboard reports; every operation funnels through validateDash, which resolves the active definition from the argument, the `_dash_definition` POST parameter, or the already-initialized `$this->definition`. If all three are empty the behavior has no idea which dashboard to render, so it throws this ApplicationException (with an empty :field substitution) — meaning no definition was supplied anywhere.","triggerScenarios":"Calling `$this->dashRender()` with no argument in a view when the behavior was never initialized with a definition (no prior initDash and no `_dash_definition` posted); an AJAX handler hitting the behavior before any dashboard was loaded; a controller where dashConfig exists but render is invoked bare.","commonSituations":"Adding the DashController behavior and calling `dashRender()` without reading the docs example (`dashRender('system')`); AJAX partial refreshes that strip the hidden `_dash_definition` input; copy-pasted controller code missing the definition argument.","solutions":["Pass the definition explicitly when rendering: `<?= $this->dashRender('main') ?>`.","Ensure the dashboard request includes the `_dash_definition` POST parameter (the widget normally sends it), e.g. keep the hidden input intact in customized partials.","Initialize early in the controller lifecycle by calling `$this->initDash('main')` so `$this->definition` is set for later handler calls."],"exampleFix":"// before\n<?= $this->dashRender() ?>\n\n// after\n<?= $this->dashRender('main') ?>","handlingStrategy":"validation","validationCode":"// In the controller before rendering or handling dash requests\npublic function dashRenderSafe($definition = null)\n{\n    $definition = $definition ?: post(\\Dashboard\\Behaviors\\DashController::PARAM_DEFINITION);\n    if (!$definition) {\n        throw new ApplicationException('No dashboard definition supplied.'); // clearer than the default\n    }\n    return $this->dashRender($definition);\n}","typeGuard":null,"tryCatchPattern":"try {\n    return $this->dashRender($definition);\n} catch (ApplicationException $e) {\n    if (str_contains($e->getMessage(), 'does not contain a definition')) {\n        // fall back to rendering a dashboard picker / default definition name\n    }\n}","preventionTips":["Always pass an explicit definition to dashRender(): dashRender('main').","Keep the hidden _dash_definition input in customized dashboard partials so AJAX round-trips carry it.","Call initDash('main') during controller init when a controller hosts exactly one dashboard."],"tags":["october-cms","dashboard","dash-controller","behavior","configuration"],"backgroundTag":"missing-configuration","analyzedSha":"b608633a7e8922487d91a8161499020121c3b3bf","analyzedAt":"2026-08-21T04:24:57.515Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}