{"record":{"id":"d77deab5c5aa4c0a","repo":"octobercms/october","slug":"the-property-name-is-not-specified-d77dea","errorCode":null,"errorMessage":"The property name is not specified.","messagePattern":"The property name is not specified\\.","errorType":"exception","errorClass":"ApplicationException","httpStatus":null,"severity":"warning","filePath":"modules/dashboard/widgets/dash/HasPropertyOptions.php","lineNumber":24,"sourceCode":"use Dashboard\\Classes\\ReportDataSourceBase;\nuse ApplicationException;\n\n/**\n * HasPropertyOptions concern\n */\ntrait HasPropertyOptions\n{\n    /**\n     * onInspectableGetOptions\n     */\n    public function onInspectableGetOptions()\n    {\n        // Disable asset broadcasting\n        $this->flushAssets();\n\n        $property = trim(post('inspectorProperty'));\n        if (!$property) {\n            throw new ApplicationException('The property name is not specified.');\n        }\n\n        $options = $this->getPropertyOptions($property);\n\n        // Convert to array to retain the sort order in JavaScript\n        $optionsArray = [];\n        foreach ((array) $options as $value => $title) {\n            $optionsArray[] = ['value' => $value, 'title' => Lang::get($title)];\n        }\n\n        return [\n            'options' => $optionsArray\n        ];\n    }\n\n    /**\n     * getPropertyOptions returns options for multi-option properties (drop-downs, etc.)\n     * @param string $property Specifies the property name","sourceCodeStart":6,"sourceCodeEnd":42,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/dashboard/widgets/dash/HasPropertyOptions.php#L6-L42","documentation":"HasPropertyOptions::onInspectableGetOptions is the AJAX handler the backend inspector calls to fetch dynamic dropdown options for a widget property. It reads the inspectorProperty POST parameter and trims it; if nothing remains it throws this ApplicationException. The property name is how getPropertyOptions() dispatches to the right options method, so an empty value cannot be processed.","triggerScenarios":"An inspector field configured with options: 'onInspectableGetOptions' but the AJAX request carries no inspectorProperty parameter; a custom inspector Vue component that invokes the options endpoint without passing the property name; whitespace-only property value from a broken form binding.","commonSituations":"Custom dashboard/report widget with a dropdown whose inspector definition references a handler but the request builder omits the property key; upgrading the backend where the inspector payload format changed; copying an options handler pattern into a new component without wiring the property attribute.","solutions":["Make sure the inspector field definition includes the property context so the framework posts inspectorProperty (e.g. the field is defined under properties with its name intact).","In custom JS, append the property name: request('onInspectableGetOptions', { inspectorProperty: 'myProperty' }).","Implement getPropertyOptions($property) on the widget so non-empty property names resolve; empty ones still fail fast by design.","Check the network request payload for the inspectorProperty key before debugging deeper handler logic."],"exampleFix":"// before (custom JS)\n$.request('onInspectableGetOptions', { data: {} });\n\n// after\n$.request('onInspectableGetOptions', { data: { inspectorProperty: 'statusOptions' } });","handlingStrategy":"validation","validationCode":"$property = trim((string) post('inspectorProperty'));\nif ($property === '') {\n    throw new \\ValidationException(['inspectorProperty' => 'Property name is required']);\n}","typeGuard":null,"tryCatchPattern":"try {\n    $options = $widget->onInspectableGetOptions();\n} catch (\\ApplicationException $e) {\n    // inspector fired without a property: log and return empty options to the picker\n    return ['options' => []];\n}","preventionTips":["Always pair an options handler with the property name in inspector field definitions.","In custom inspector components, include inspectorProperty in every options request.","Test inspector dropdowns after upgrading the backend module."],"tags":["dashboard","inspector","ajax","request-payload"],"backgroundTag":"missing-request-parameter","analyzedSha":"b608633a7e8922487d91a8161499020121c3b3bf","analyzedAt":"2026-08-21T04:24:57.515Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}