phacility/phabricator · error · Exception
Export format ("%s") is not enabled.
Error message
Export format ("%s") is not enabled. What it means
The export bulk worker resolved the format class from its key, but the format reports itself disabled via isExportFormatEnabled(). This is an install-capability check, not a configuration toggle: for example PhabricatorExcelExportFormat (xlsx) returns false when the PHP 'zip' extension is not loaded or the PHPExcel library file cannot be included; csv/json/txt always return true.
Source
Thrown at src/infrastructure/export/engine/PhabricatorExportEngineBulkJobType.php:96
throw new Exception(
pht(
'Failed to load saved query ("%s").',
$query_key));
}
$format_key = $job->getParameter('formatKey');
$all_formats = PhabricatorExportFormat::getAllExportFormats();
$format = idx($all_formats, $format_key);
if (!$format) {
throw new Exception(
pht(
'Unknown export format ("%s").',
$format_key));
}
if (!$format->isExportFormatEnabled()) {
throw new Exception(
pht(
'Export format ("%s") is not enabled.',
$format_key));
}
$export_engine = id(new PhabricatorExportEngine())
->setViewer($actor)
->setTitle($job->getParameter('title'))
->setFilename($job->getParameter('filename'))
->setSearchEngine($engine)
->setSavedQuery($saved_query)
->setExportFormat($format);
$file = $export_engine->exportFile();
$job
->setParameter('filePHID', $file->getPHID())
->save();View on GitHub (pinned to 5720a38cfe)
Solutions
- Install/enable the PHP zip extension (e.g. apt install php-zip) and restart PHP and the daemons, or ensure PHPExcel is on the include path
- Export as CSV or JSON instead, which are always enabled
- Run bin/config get or a php -m check on the host that executes worker jobs to verify extensions
- Keep web and worker hosts' PHP configurations identical so formats offered in the UI match what workers can produce
Example fix
// before: queueing xlsx blindly
$job->setParameter('formatKey', 'xlsx');
// after: pick the first enabled format the worker can actually produce
$formats = PhabricatorExportFormat::getAllExportFormats();
$format = idx($formats, 'xlsx');
if (!$format || !$format->isExportFormatEnabled()) {
$format = idx($formats, 'csv');
}
$job->setParameter('formatKey', $format->getExportFormatKey()); Defensive patterns
Strategy: validation
Validate before calling
$formats = PhabricatorExportFormat::getAllExportFormats();
$format = idx($formats, $format_key);
if (!$format || !$format->isExportFormatEnabled()) {
$format = idx($formats, 'csv'); // always enabled
$format_key = $format->getExportFormatKey();
}
$job->setParameter('formatKey', $format_key); Prevention
- Offer only formats where isExportFormatEnabled() returns true on the host that runs workers, not just the web host
- Keep php-zip and any format dependencies (PHPExcel) installed and identical on all web/worker hosts
When it happens
Trigger: Exporting as 'xlsx' on a host without the PHP zip extension or without PHPExcel installed; queueing an export that runs on a different web/worker host with a different PHP configuration than the host that offered the format in the UI.
Common situations: php-zip missing after a server migration or PHP upgrade; PHPExcel not deployed to the phabricator/libphutil library path; UI shows xlsx (web host has zip) but the worker host does not, so the queued job fails.
Related errors
- Unable to transform image: the imagecreatefromstring() funct
- Use "--output <path>" to specify an output file, or "--outpu
- Flag "--overwrite" has no effect when outputting to stdout.
- Output path already exists. Use "--overwrite" to overwrite i
- Specify one or more queries to export with "--query".
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/fb273ad3ff09d87b.
Report an issue: GitHub.