octobercms/october · error · ApplicationException

List used in :class has no list columns defined.

Error message

List used in :class has no list columns defined.

What it means

Final guard in defineListColumns: after merging columns from the config and from the model's field definitions, the widget checks that at least one column was registered. An empty allColumns means neither the list config nor the model supplied any column definitions, leaving nothing to render; the message names the responsible class.

Solutions

  1. Add a columns section to the list configuration (config_list.yaml)
  2. Define list columns on the model so addColumnsFromModel can discover them
  3. Verify the list config file is being loaded at all (correct path and alias)
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at modules/backend/widgets/Lists.php:970 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/cb90924a722daa71. Report an issue: GitHub.

Appendix: source

Thrown at modules/backend/widgets/Lists.php:970

     * defineListColumns builds an array of list columns with keys as the column name
     * and values as a ListColumn object
     */
    protected function defineListColumns(): array
    {
        if (!isset($this->columns) || !is_array($this->columns)) {
            $this->columns = [];
        }

        if ($this->columns) {
            $this->addColumns($this->columns);
        }
        else {
            $this->addColumnsFromModel();
        }

        if (!$this->allColumns) {
            $class = get_class($this->model instanceof Model ? $this->model : $this->controller);
            throw new ApplicationException(Lang::get('backend::lang.list.missing_columns', compact('class')));
        }

        /**
         * @event backend.list.extendColumns
         * Provides an opportunity to modify the columns of a List widget
         *
         * Example usage:
         *
         *     Event::listen('backend.list.extendColumns', function ($listWidget) {
         *         // Only for the User controller
         *         if (!$listWidget->getController() instanceof \Backend\Controllers\Users) {
         *             return;
         *         }
         *
         *         // Only for the User model
         *         if (!$listWidget->model instanceof \Backend\Models\User) {
         *             return;
         *         }

View on GitHub (pinned to b608633a7e)