octobercms/october · error · ApplicationException
Invalid orders string.
Error message
Invalid orders string.
What it means
Input guard in onSetWidgetOrders: the companion check to the aliases guard — it trims the 'orders' POST field and throws when empty. The reorder request carried aliases but no comma-separated order values, so the new sort positions cannot be applied.
Solutions
- Ensure the reorder request posts a non-empty, comma-separated list of sort orders matching the aliases
- Use the dashboard's drag-and-drop reorder UI, which sends both fields
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at modules/backend/widgets/ReportContainer.php:290 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/9ae43d352d7e74b3.
Report an issue: GitHub.
Appendix: source
Thrown at modules/backend/widgets/ReportContainer.php:290
/**
* onSetWidgetOrders
*/
public function onSetWidgetOrders()
{
if (!$this->showReorder) {
throw new ForbiddenException;
}
$aliases = trim(Request::input('aliases'));
$orders = trim(Request::input('orders'));
if (!$aliases) {
throw new ApplicationException('Invalid aliases string.');
}
if (!$orders) {
throw new ApplicationException('Invalid orders string.');
}
$aliases = explode(',', $aliases);
$orders = explode(',', $orders);
if (count($aliases) != count($orders)) {
throw new ApplicationException('Invalid data posted.');
}
$widgets = $this->getWidgetsFromUserPreferences();
foreach ($aliases as $index => $alias) {
if (isset($widgets[$alias])) {
$widgets[$alias]['sortOrder'] = $orders[$index];
}
}
$this->setWidgetsToUserPreferences($widgets);
}View on GitHub (pinned to b608633a7e)