{"record":{"id":"e00005b3fefb946c","repo":"octobercms/october","slug":"importing-as-csv-requires-column-matches-definitio","errorCode":null,"errorMessage":"Importing as CSV requires column matches definition","messagePattern":"Importing as CSV requires column matches definition","errorType":"exception","errorClass":"ApplicationException","httpStatus":null,"severity":"error","filePath":"modules/backend/models/ImportModel.php","lineNumber":118,"sourceCode":"     *   [0 => [first_name], 1 => [last_name]]\n     *\n     * Will return:\n     *\n     *   [first_name => Joe, last_name => Blogs],\n     *   [first_name => Harry, last_name => Potter],\n     *   [...]\n     *\n     * @return array\n     */\n    protected function processImportData($filePath, $matches, $options)\n    {\n        // Prepare output\n        if ($this->file_format === 'json') {\n            $result = $this->processImportDataAsJson($filePath, $matches, $options);\n        }\n        else {\n            if (!$matches) {\n                throw new ApplicationException('Importing as CSV requires column matches definition');\n            }\n\n            $result = $this->processImportDataAsCsv($filePath, $matches, $options);\n        }\n\n        return $result;\n    }\n\n    /**\n     * decodeArrayValue prepares an array object for the file type.\n     * @return array\n     */\n    protected function decodeArrayValue($value, $delimiter = '|')\n    {\n        if ($this->file_format === 'json') {\n            return $this->decodeArrayValueForJson($value);\n        }\n        else {","sourceCodeStart":100,"sourceCodeEnd":136,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/backend/models/ImportModel.php#L100-L136","documentation":"Error \"Importing as CSV requires column matches definition\" thrown in octobercms/october.","triggerScenarios":"Thrown at modules/backend/models/ImportModel.php:118 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"}