octobercms/october · error · ApplicationException

Invalid aliases string.

Error message

Invalid aliases string.

What it means

Input guard in onSetWidgetOrders: after the reorder permission check, it trims the 'aliases' POST field and throws when the result is empty. The dashboard reorder request therefore arrived without the comma-separated widget alias list — a broken sortable UI event or a manually crafted request.

Solutions

  1. Ensure the reorder request posts a non-empty, comma-separated list of widget aliases
  2. Trigger reordering through the dashboard's supported sortable interaction so aliases are included
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at modules/backend/widgets/ReportContainer.php:286 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/d4e86e62d23433f6. Report an issue: GitHub.

Appendix: source

Thrown at modules/backend/widgets/ReportContainer.php:286

                'sortOrder' => $widgetInfo['sortOrder']
            ])
        ];
    }

    /**
     * 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];
            }

View on GitHub (pinned to b608633a7e)