octobercms/october · error · Error
cms:group-pages command excepts a parameter
Error message
cms:group-pages command excepts a parameter: ${commandObj.fullCommand} What it means
Command-contract guard in groupPages: the 'cms:group-pages' handler requires a grouping parameter (e.g. path or url) but the incoming command object has none. The sort/group menu emitted a command without its expected suffix.
Solutions
- Emit the command with a parameter, e.g. cms:group-pages@path
- Fix the menu item that produces the bare command
- Verify listener patterns ('cms:group-pages@path, cms:group-pages@url') match emitted commands
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at modules/cms/assets/js/cms.editor.extension.documentcontroller.page.js:77 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of octobercms/october@b608633a7e (2026-08-21).
Data as JSON: /api/errors/548ea12c7c5ba005.
Report an issue: GitHub.
Appendix: source
Thrown at modules/cms/assets/js/cms.editor.extension.documentcontroller.page.js:77
throw new Error(`cms:display-pages command excepts a parameter: ${commandObj.fullCommand}`);
}
const pagesNode = this.rootNavigatorNodeSafe;
if (!pagesNode) {
return;
}
const displayItem = menuUtils.findMenuItem(pagesNode.topLevelMenuitems, ['display'], 'command');
menuUtils.checkItemInGroup(displayItem.items, commandObj.fullCommand);
pagesNode.displayProperty = commandObj.parameter;
localStorage.setItem('cms-pages-display-cmd', commandObj.fullCommand);
}
groupPages(commandObj) {
if (!commandObj.hasParameter) {
throw new Error(`cms:group-pages command excepts a parameter: ${commandObj.fullCommand}`);
}
const pagesNode = this.rootNavigatorNodeSafe;
if (!pagesNode) {
return;
}
const groupingItem = menuUtils.findMenuItem(pagesNode.topLevelMenuitems, ['grouping'], 'command');
menuUtils.checkItemInGroup(groupingItem.items, commandObj.fullCommand);
pagesNode.groupBy = commandObj.parameter;
if (commandObj.parameter == 'path') {
pagesNode.groupByMode = 'folders';
pagesNode.groupByRegex = null;
pagesNode.groupFolderDisplayPathProps = ['filename'];
}
else {View on GitHub (pinned to b608633a7e)