{"record":{"id":"cb90924a722daa71","repo":"octobercms/october","slug":"list-used-in-class-has-no-list-columns-defined","errorCode":null,"errorMessage":"List used in :class has no list columns defined.","messagePattern":"List used in :class has no list columns defined\\.","errorType":"exception","errorClass":"ApplicationException","httpStatus":null,"severity":"error","filePath":"modules/backend/widgets/Lists.php","lineNumber":970,"sourceCode":"     * defineListColumns builds an array of list columns with keys as the column name\n     * and values as a ListColumn object\n     */\n    protected function defineListColumns(): array\n    {\n        if (!isset($this->columns) || !is_array($this->columns)) {\n            $this->columns = [];\n        }\n\n        if ($this->columns) {\n            $this->addColumns($this->columns);\n        }\n        else {\n            $this->addColumnsFromModel();\n        }\n\n        if (!$this->allColumns) {\n            $class = get_class($this->model instanceof Model ? $this->model : $this->controller);\n            throw new ApplicationException(Lang::get('backend::lang.list.missing_columns', compact('class')));\n        }\n\n        /**\n         * @event backend.list.extendColumns\n         * Provides an opportunity to modify the columns of a List widget\n         *\n         * Example usage:\n         *\n         *     Event::listen('backend.list.extendColumns', function ($listWidget) {\n         *         // Only for the User controller\n         *         if (!$listWidget->getController() instanceof \\Backend\\Controllers\\Users) {\n         *             return;\n         *         }\n         *\n         *         // Only for the User model\n         *         if (!$listWidget->model instanceof \\Backend\\Models\\User) {\n         *             return;\n         *         }","sourceCodeStart":952,"sourceCodeEnd":988,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/backend/widgets/Lists.php#L952-L988","documentation":"Error \"List used in :class has no list columns defined.\" thrown in octobercms/october.","triggerScenarios":"Thrown at modules/backend/widgets/Lists.php:970 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b608633a7e8922487d91a8161499020121c3b3bf","analyzedAt":"2026-08-21T04:24:57.515Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}