octobercms/october · error · ApplicationException
The import file was not found using session key…
Error message
The import file was not found using session key [$sessionKey]
What it means
Thrown by ImportModel::import when no uploaded import file can be located for the given session key — getImportFilePath($sessionKey) returned null. The import form saves the uploaded file against a deferred binding session; a missing/lost session key or expired upload causes the path lookup to fail.
Solutions
- Re-upload the import file in the same session before running the import
- Ensure the sessionKey from the upload step is passed through to the import request
- Check that deferred file bindings were not cleaned up (long-idle session) before importing
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at modules/backend/models/ImportModel.php:78 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/e59a05d2739d4188.
Report an issue: GitHub.
Appendix: source
Thrown at modules/backend/models/ImportModel.php:78
* [
* 0 => [db_name1, db_name2],
* 1 => [db_name3],
* ...
* ]
*
* The key (0, 1) is the column index in the CSV and the value
* is another array of target database column names.
*/
public function import($matches, $options = [])
{
$sessionKey = $options['sessionKey'] ?? null;
$importFilePath = $options['importFilePath'] ?? null;
$path = $importFilePath ?: $this->getImportFilePath($sessionKey);
if (!$path) {
throw new ApplicationException("The import file was not found using session key [$sessionKey]");
}
$data = $this->processImportData($path, $matches, $options);
return $this->importData($data, $sessionKey);
}
/**
* importFile imports a file directly from disk
*/
public function importFile($filePath, $options = [])
{
$matches = $options['matches'] ?? null;
return $this->import($matches, ['importFilePath' => $filePath] + $options);
}
/**View on GitHub (pinned to b608633a7e)