{"record":{"id":"e58fdb725905712b","repo":"octobercms/october","slug":"cms-sort-pages-command-excepts-a-parameter-comm","errorCode":null,"errorMessage":"cms:sort-pages command excepts a parameter: ${commandObj.fullCommand}","messagePattern":"cms:sort-pages command excepts a parameter: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"modules/cms/assets/js/cms.editor.extension.documentcontroller.page.js","lineNumber":41,"sourceCode":"\n        knownSortingModes.forEach((item) => {\n            const itemValue = localStorage.getItem(item);\n            if (itemValue !== null) {\n                this.emit(itemValue);\n            }\n        });\n    }\n\n    initListeners() {\n        this.on('cms:sort-pages@title, cms:sort-pages@url, cms:sort-pages@filename', this.sortPages);\n        this.on('cms:group-pages@path, cms:group-pages@url', this.groupPages);\n        this.on('cms:display-pages@title, cms:display-pages@url, cms:display-pages@filename', this.setDisplayMode);\n        this.on('cms:navigator-nodes-updated', this.onNavigatorNodesUpdated);\n    }\n\n    sortPages(commandObj) {\n        if (!commandObj.hasParameter) {\n            throw new Error(`cms:sort-pages command excepts a parameter: ${commandObj.fullCommand}`);\n        }\n\n        const pagesNode = this.rootNavigatorNodeSafe;\n        if (!pagesNode) {\n            return;\n        }\n\n        const sortingItem = menuUtils.findMenuItem(pagesNode.topLevelMenuitems, ['sorting'], 'command');\n\n        menuUtils.checkItemInGroup(sortingItem.items, commandObj.fullCommand);\n        pagesNode.sortBy = commandObj.parameter;\n\n        localStorage.setItem('cms-pages-sort-cmd', commandObj.fullCommand);\n    }\n\n    setDisplayMode(commandObj) {\n        if (!commandObj.hasParameter) {\n            throw new Error(`cms:display-pages command excepts a parameter: ${commandObj.fullCommand}`);","sourceCodeStart":23,"sourceCodeEnd":59,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/cms/assets/js/cms.editor.extension.documentcontroller.page.js#L23-L59","documentation":"Error \"cms:sort-pages command excepts a parameter: ${commandObj.fullCommand}\" thrown in octobercms/october.","triggerScenarios":"Thrown at modules/cms/assets/js/cms.editor.extension.documentcontroller.page.js:41 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b608633a7e8922487d91a8161499020121c3b3bf","analyzedAt":"2026-08-21T04:24:57.515Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}