{"record":{"id":"64497bc0555cd1c2","repo":"octobercms/october","slug":"oninspectablegetoptions-must-return-an-array","errorCode":null,"errorMessage":"onInspectableGetOptions must return an array","messagePattern":"onInspectableGetOptions must return an array","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"modules/dashboard/assets/js/classes/inspector-configurator.js","lineNumber":320,"sourceCode":"            ]\n        });\n    }\n\n    async requestOptions(obj, parentObj, property, cacheKey, cachePropertyNames) {\n        var data = Object.assign({}, $.oc.vueUtils.getCleanObject(parentObj), $.oc.vueUtils.getCleanObject(obj));\n        data.inspectorProperty = property;\n\n        const responseData = await this.dataLoader.requestOptions(\n            this.$el,\n            null,\n            this.store.getEventHandler('onInspectableGetOptions'),\n            data,\n            cacheKey,\n            cachePropertyNames\n        );\n\n        if (!Array.isArray(responseData.options)) {\n            throw new Error('onInspectableGetOptions must return an array');\n        }\n\n        const result = {};\n        responseData.options.forEach(item => {\n            result[item.value] = item.title;\n        })\n\n        return result;\n    }\n\n    async formatFilterItemTitle(item, obj, parentObj) {\n        const options = await this.requestOptions(\n            obj,\n            parentObj,\n            'filter_attribute',\n            this.filterAttributeCacheKey,\n            this.filterAttributeCachePropertyNames\n        );","sourceCodeStart":302,"sourceCodeEnd":338,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/dashboard/assets/js/classes/inspector-configurator.js#L302-L338","documentation":"Runtime type check in InspectorConfigurator.requestOptions: the AJAX handler bound to onInspectableGetOptions returned a payload whose 'options' entry is not an Array, so dropdown/radio options cannot be used.","triggerScenarios":"Thrown at modules/dashboard/assets/js/classes/inspector-configurator.js:320 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Make the onInspectableGetOptions handler return ['options' => [...]] as a plain array","Ensure the handler does not return an object, null, or paginated wrapper"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b608633a7e8922487d91a8161499020121c3b3bf","analyzedAt":"2026-08-21T04:24:57.515Z","contentChangedAt":"2026-08-21T04:24:57.515Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}