{"record":{"id":"163902dcff9b821f","repo":"octobercms/october","slug":"the-itemproperties-property-should-be-specified-in","errorCode":null,"errorMessage":"The itemProperties property should be specified in the objectList editor configuration. Property: ${propertyDefinition.property}","messagePattern":"The itemProperties property should be specified in the objectList editor configuration\\. Property: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"warning","filePath":"modules/backend/assets/foundation/controls/inspector/inspector.editor.objectlist.js","lineNumber":18,"sourceCode":"/*\n * Inspector object list editor class.\n */\n+function ($) { \"use strict\";\n\n    var Base = $.oc.inspector.propertyEditors.base,\n        BaseProto = Base.prototype\n\n    var ObjectListEditor = function(inspector, propertyDefinition, containerCell, group) {\n        this.currentRowInspector = null\n        this.popup = null\n\n        if (propertyDefinition.titleProperty === undefined) {\n            throw new Error('The titleProperty property should be specified in the objectList editor configuration. Property: ' + propertyDefinition.property)\n        }\n\n        if (propertyDefinition.itemProperties === undefined) {\n            throw new Error('The itemProperties property should be specified in the objectList editor configuration. Property: ' + propertyDefinition.property)\n        }\n\n        Base.call(this, inspector, propertyDefinition, containerCell, group)\n    }\n\n    ObjectListEditor.prototype = Object.create(BaseProto)\n    ObjectListEditor.prototype.constructor = Base\n\n    ObjectListEditor.prototype.init = function() {\n        if (this.isKeyValueMode()) {\n            var keyProperty = this.getKeyProperty()\n\n            if (!keyProperty) {\n                throw new Error('Object list key property ' + this.propertyDefinition.keyProperty\n                    + ' is not defined in itemProperties. Property: ' + this.propertyDefinition.property)\n            }\n        }\n","sourceCodeStart":1,"sourceCodeEnd":36,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/backend/assets/foundation/controls/inspector/inspector.editor.objectlist.js#L1-L36","documentation":"In PageLookup::onInsertReference, after a type is supplied the widget checks the `cms_page` form field: if that field is not hidden and the submitted data contains no `cms_page` key, this ValidationException is raised against the `cms_page` field. It exists to force the user to pick which CMS page will host or resolve the inserted link.","triggerScenarios":"Submitting the lookup popup with the CMS page dropdown left empty while the `cms_page` field is visible (depends on the chosen type and widget configuration); posting `PageLookupItem` data that omits `cms_page`.","commonSituations":"Users clicking insert before choosing a page; field configuration that shows `cms_page` for a type that does not need it; automated submissions missing the key.","solutions":["Select a CMS page in the popup's dropdown before inserting the link.","If the chosen type does not need a CMS page, hide the field in the widget's field config so the check is skipped (`$widget->getField('cms_page')->hidden` is truthy).","When calling the handler programmatically, always include `cms_page` in the payload when the field is visible."],"exampleFix":"// before\noc.request(el, 'pagelookup::onInsertReference', {\n    data: { PageLookupItem: { type: 'cms-page' } }\n});\n\n// after\noc.request(el, 'pagelookup::onInsertReference', {\n    data: { PageLookupItem: { type: 'cms-page', cms_page: 'about/index' } }\n});","handlingStrategy":"validation","validationCode":"const item = { ...payload.PageLookupItem };\nif (!item.cms_page && cmsPageFieldVisible) {\n    showFlash('Please select a CMS page.');\n} else {\n    oc.request(el, 'pagelookup::onInsertReference', { data: { PageLookupItem: item } });\n}","typeGuard":null,"tryCatchPattern":"try {\n    $result = $widget->onInsertReference();\n} catch (October\\Rain\\Exception\\ValidationException $e) {\n    $errors = $e->getErrors(); // ['cms_page' => 'Please select a CMS page']\n}","preventionTips":["Mark the CMS page dropdown required in the popup UI.","Hide the cms_page field server-side for types that do not need it (the check skips hidden fields).","Include cms_page in programmatic payloads whenever the field is visible."],"tags":["october-cms","backend-widget","pagelookup","form-validation","ajax"],"backgroundTag":"form-validation-failed","analyzedSha":"b608633a7e8922487d91a8161499020121c3b3bf","analyzedAt":"2026-08-21T04:24:57.515Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}