{"record":{"id":"0f7954d8fa614330","repo":"octobercms/october","slug":"object-list-value-should-be-an-object-property","errorCode":null,"errorMessage":"Object list value should be an object. Property: ${this.propertyDefinition.property}","messagePattern":"Object list value should be an object\\. Property: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"modules/backend/assets/foundation/controls/inspector/inspector.editor.objectlist.js","lineNumber":101,"sourceCode":"                link.textContent = placeholder\n            }\n            else {\n                link.textContent = 'Items: 0'\n            }\n        }\n        else {\n            var itemCount = 0\n\n            if (!this.isKeyValueMode()) {\n                if (value.length === undefined) {\n                    throw new Error('Object list value should be an array. Property: ' + this.propertyDefinition.property)\n                }\n\n                itemCount = value.length\n            }\n            else {\n                if (typeof value !== 'object') {\n                    throw new Error('Object list value should be an object. Property: ' + this.propertyDefinition.property)\n                }\n\n                itemCount = this.getValueKeys(value).length\n            }\n\n            $.oc.foundation.element.removeClass(link, 'cell-placeholder')\n            link.textContent = 'Items: ' + itemCount\n        }\n    }\n\n    ObjectListEditor.prototype.getPopupContent = function() {\n        return '<form>                                                                                     \\\n                <div class=\"modal-header\">                                                                 \\\n                    <h4 class=\"modal-title\">{{property}}</h4>                                              \\\n                    <button type=\"button\" class=\"btn-close\" data-dismiss=\"popup\"></button>                 \\\n                </div>                                                                                     \\\n                <div>                                                                                      \\\n                    <div class=\"layout inspector-columns-editor\">                                          \\","sourceCodeStart":83,"sourceCodeEnd":119,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/backend/assets/foundation/controls/inspector/inspector.editor.objectlist.js#L83-L119","documentation":"SnippetLookup::onGetInspectorConfiguration reads the `component` POST parameter and calls class_exists on it before anything else. A non-empty component string that does not name an existing class throws this ApplicationException with the class name substituted for :code. It guards the inspector from generating a configuration UI for a PHP component class that is no longer present.","triggerScenarios":"An AJAX request to `snippetlookup::onGetInspectorConfiguration` with `component: 'Acme\\Blog\\Components\\Gone'` where that class does not exist (renamed, moved namespace, plugin removed, typo in the request).","commonSituations":"Renaming or deleting a component class while an editor session still references the old name; disabling/uninstalling a plugin whose snippets are still placed in a theme; stale browser state re-posting an old inspector request after a deploy.","solutions":["Verify the fully-qualified class name in the request matches an existing class (check namespace and casing).","Reload the backend page / close and reopen the snippet editor so the UI stops posting the stale component name.","If a plugin was removed, delete or re-save the theme content that still embeds its snippet component."],"exampleFix":"// before\noc.request(el, 'onGetInspectorConfiguration', {\n    data: { component: 'Acme\\\\Blog\\\\Components\\\\FeaturedPosts' }\n});\n\n// after (class was renamed to PostList)\noc.request(el, 'onGetInspectorConfiguration', {\n    data: { component: 'Acme\\\\Blog\\\\Components\\\\PostList' }\n});","handlingStrategy":"try-catch","validationCode":"// Server-side, before asking the widget for inspector config\nif ($componentClass && !class_exists($componentClass)) {\n    // skip the request; refresh the editor UI instead of posting a dead class name\n    return ['error' => 'unknown component: '.$componentClass];\n}","typeGuard":null,"tryCatchPattern":"// Client side via oc.request\noc.request(el, 'onGetInspectorConfiguration', { data }).catch(err => {\n    // ApplicationException arrives as an error flash / X_OCTOBER_ERROR_MESSAGE\n    console.warn(err.message ?? 'Snippet component not found');\n});","preventionTips":["After renaming or moving a component class, hard-refresh the backend page so stale inspector requests stop.","Remove or re-save theme content that still references uninstalled plugin components.","Use fully-qualified class names with correct casing in snippet/component registrations."],"tags":["october-cms","snippets","inspector","ajax","class-not-found"],"backgroundTag":"class-not-found","analyzedSha":"b608633a7e8922487d91a8161499020121c3b3bf","analyzedAt":"2026-08-21T04:24:57.515Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}