octobercms/october · error · Error
Key property ${keyProperty} is not found in the Inspector da
Error message
Key property ${keyProperty} is not found in the Inspector data. Property: ${this.propertyDefinition.property} What it means
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.
Source
Thrown at modules/backend/assets/foundation/controls/inspector/inspector.editor.objectlist.js:482
$(link).popup('hide')
return false
}
ObjectListEditor.prototype.validateKeyValue = function() {
if (!this.isKeyValueMode()) {
return true
}
if (this.currentRowInspector === null) {
return true
}
var data = this.currentRowInspector.getValues(),
keyProperty = this.propertyDefinition.keyProperty
if (data[keyProperty] === undefined) {
throw new Error('Key property ' + keyProperty + ' is not found in the Inspector data. Property: ' + this.propertyDefinition.property)
}
var keyPropertyValue = data[keyProperty],
keyPropertyTitle = this.getKeyProperty().title
if (typeof keyPropertyValue !== 'string') {
throw new Error('Key property (' + keyProperty + ') value should be a string. Property: ' + this.propertyDefinition.property)
}
if ($.trim(keyPropertyValue).length === 0) {
$.oc.flashMsg({text: 'The value of key property ' + keyPropertyTitle + ' cannot be empty.', 'class': 'error', 'interval': 3})
return false
}
var selectedRow = this.getSelectedRow(),
tbody = this.getTableBody(),
dataRows = tbody.querySelectorAll('tr[data-inspector-values]')
View on GitHub (pinned to b608633a7e)
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.
Example fix
// before
<?= $this->dashRender() ?>
// after
<?= $this->dashRender('main') ?> Defensive patterns
Strategy: validation
Validate before calling
// In the controller before rendering or handling dash requests
public function dashRenderSafe($definition = null)
{
$definition = $definition ?: post(\Dashboard\Behaviors\DashController::PARAM_DEFINITION);
if (!$definition) {
throw new ApplicationException('No dashboard definition supplied.'); // clearer than the default
}
return $this->dashRender($definition);
} Try / catch
try {
return $this->dashRender($definition);
} catch (ApplicationException $e) {
if (str_contains($e->getMessage(), 'does not contain a definition')) {
// fall back to rendering a dashboard picker / default definition name
}
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Key property (${keyProperty}) value should be a string. Prop
- Trying to get selected row without a popup reference.
- Cannot find the requested row group.
- Inspector container ${$containerHolder.data['inspector-conta
- Cannot switch to container: a container element is not found
AI-assisted analysis of octobercms/october@b608633a7e (2026-08-21).
Data as JSON: /api/errors/7ede96ede6cef919.
Report an issue: GitHub.