{"record":{"id":"bdcd26788a1c917f","repo":"octobercms/october","slug":"the-titleproperty-property-should-be-specified-in","errorCode":null,"errorMessage":"The titleProperty property should be specified in the objectList editor configuration. Property: ${propertyDefinition.property}","messagePattern":"The titleProperty property should be specified in the objectList editor configuration\\. Property: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"modules/backend/assets/foundation/controls/inspector/inspector.editor.objectlist.js","lineNumber":14,"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","sourceCodeStart":1,"sourceCodeEnd":32,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/backend/assets/foundation/controls/inspector/inspector.editor.objectlist.js#L1-L32","documentation":"The CMS Page Lookup popup widget (the link picker used by the rich editor and form fields) validates its submitted form data in onInsertReference. The first check pulls `type` out of the widget's save data via array_pull; if it is empty, a ValidationException is thrown against the `type` field. The type identifies what is being linked (url, cms page, static page, etc.) and drives every later check.","triggerScenarios":"Posting to the widget's `onInsertReference` AJAX handler (e.g. `pagelookup::onInsertReference`) with `PageLookupItem[type]` missing or empty; a customized pagelookup form partial whose type select was removed or renamed; programmatic calls or tests that submit an empty payload.","commonSituations":"Overriding the pagelookup widget form partial and dropping the hidden type field; JS that clears the select before submit; automated tests invoking the handler directly with no form data.","solutions":["Make sure the popup form posts a non-empty `type` value in the widget data (normally `PageLookupItem[type]`).","If you customized the widget's form fields, restore or keep the `type` field (visible or hidden) so getSaveData returns it.","When calling the handler programmatically, include the full payload: `{ PageLookupItem: { type: 'url', url: '...' } }`."],"exampleFix":"// before\noc.request(el, 'pagelookup::onInsertReference', {\n    data: { PageLookupItem: {} }\n});\n\n// after\noc.request(el, 'pagelookup::onInsertReference', {\n    data: { PageLookupItem: { type: 'url', url: 'https://example.com' } }\n});","handlingStrategy":"validation","validationCode":"// Before firing the handler, make sure the widget data carries a type\nconst item = { ...payload.PageLookupItem };\nif (!item.type) {\n    // do not call the AJAX handler; prompt the user to pick a link type\n    showFlash('Select a link type first.');\n} else {\n    oc.request(el, 'pagelookup::onInsertReference', { data: { PageLookupItem: item } });\n}","typeGuard":null,"tryCatchPattern":"// Server-side, ValidationException is the intended failure mode; let it convert to field errors\ntry {\n    $widget->onInsertReference();\n} catch (ValidationException $e) {\n    // $e->getErrors() -> ['type' => 'Missing type!'] — map back onto the form UI\n}","preventionTips":["Keep the type select (even hidden) in any customized pagelookup form partial.","Disable the insert button until a link type is chosen.","In tests, always submit a minimal complete PageLookupItem payload."],"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"}