octobercms/october · error · ApplicationException
Invalid data posted.
Error message
Invalid data posted.
What it means
Consistency guard in onSetWidgetOrders: aliases and orders are exploded into arrays and their counts compared. A mismatch means the two comma-separated lists do not line up positionally (one entry missing or extra), so each widget's new sort order would be ambiguous and the request is rejected as malformed.
Solutions
- Send exactly one order value per widget alias in the request
- Rebuild the request from the dashboard's reorder UI rather than constructing the payloads manually
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at modules/backend/widgets/ReportContainer.php:297 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/7e0d1abd1d424aba.
Report an issue: GitHub.
Appendix: source
Thrown at modules/backend/widgets/ReportContainer.php:297
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);
}
//
// Widget API
//
/**
* addWidgetView on GitHub (pinned to b608633a7e)