{"record":{"id":"a9f0b83e29638f87","repo":"octobercms/october","slug":"page-lookup-popup-option-alias-is-not-set","errorCode":null,"errorMessage":"Page Lookup popup option \"alias\" is not set.","messagePattern":"Page Lookup popup option \"alias\" is not set\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"modules/cms/widgets/pagelookup/assets/js/pagelookup.js","lineNumber":66,"sourceCode":"            const url = el.match(/href=\"(.*?)\"/);\n            if (url !== null) {\n                const processedUrl = processResolverLink(url[1]);\n                htmlText = htmlText.replace(el, el.replace(url[1], processedUrl));\n            }\n        }\n    }\n    return htmlText;\n}\n\nclass PageLookupWidget {\n    static proxyCounter = 0;\n\n    constructor(config) {\n        this.config = this.getConfig(config);\n        this.proxiedMethods = {};\n\n        if (this.config.alias === null) {\n            throw new Error('Page Lookup popup option \"alias\" is not set.');\n        }\n\n        this.$rootElement = $('<div />');\n        this.$rootElement.one('hide.oc.popup', this.proxy(this.onPopupHidden));\n        this.$rootElement.one('shown.oc.popup', this.proxy(this.onPopupShown));\n\n        this.show();\n    }\n\n    dispose() {\n        for (const key in this.proxiedMethods) {\n            this.proxiedMethods[key] = null;\n        }\n\n        for (const propertyName of Object.getOwnPropertyNames(this)) {\n            this[propertyName] = null;\n        }\n    }","sourceCodeStart":48,"sourceCodeEnd":84,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/cms/widgets/pagelookup/assets/js/pagelookup.js#L48-L84","documentation":"Constructor guard in the client-side PageLookupWidget: the data-config passed from PHP omitted the alias option (the AJAX handler alias), so the widget cannot talk to its server counterpart. The PHP widget must render the alias in its configuration.","triggerScenarios":"Thrown at modules/cms/widgets/pagelookup/assets/js/pagelookup.js:66 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass an 'alias' option when initializing the PageLookup popup widget","Check that server-side widget rendering supplies the data-alias attribute"],"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"}