{"record":{"id":"e81a7ce25375b738","repo":"octobercms/october","slug":"you-must-implement-the-controller-behavior-listcon","errorCode":null,"errorMessage":"You must implement the controller behavior ListController with the export 'useList' option enabled.","messagePattern":"You must implement the controller behavior ListController with the export 'useList' option enabled\\.","errorType":"exception","errorClass":"ApplicationException","httpStatus":null,"severity":"error","filePath":"modules/backend/behaviors/importexportcontroller/HasListExport.php","lineNumber":22,"sourceCode":"use Response;\nuse ApplicationException;\n\n/**\n * HasListExport contains logic for imports\n */\ntrait HasListExport\n{\n    /**\n     * checkUseListExportMode\n     */\n    protected function checkUseListExportMode()\n    {\n        if (!$useList = $this->getConfig('export[useList]')) {\n            return false;\n        }\n\n        if (!$this->controller->isClassExtendedWith(\\Backend\\Behaviors\\ListController::class)) {\n            throw new ApplicationException(__(\"You must implement the controller behavior ListController with the export 'useList' option enabled.\"));\n        }\n\n        if (is_array($useList)) {\n            $listDefinition = array_get($useList, 'definition');\n        }\n        else {\n            $listDefinition = $useList;\n        }\n\n        return $this->exportFromList($listDefinition);\n    }\n\n    /**\n     * exportFromList outputs the list results as a CSV export.\n     * @param string $definition\n     * @param array $options\n     */\n    public function exportFromList($definition = null, $options = [])","sourceCodeStart":4,"sourceCodeEnd":40,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/backend/behaviors/importexportcontroller/HasListExport.php#L4-L40","documentation":"Error \"You must implement the controller behavior ListController with the export 'useList' option enabled.\" thrown in octobercms/october.","triggerScenarios":"Thrown at modules/backend/behaviors/importexportcontroller/HasListExport.php:22 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"}