phacility/phabricator · warning · PhutilArgumentUsageException
Export format ("%s") is not enabled.
Error message
Export format ("%s") is not enabled. What it means
A format class can be registered yet disabled: isExportFormatEnabled() returning false marks formats that ship but are turned off. Selecting such a format aborts even though the key itself is valid and known.
Source
Thrown at src/applications/transactions/bulk/management/PhabricatorBulkManagementExportWorkflow.php:71
$format_key = $args->getArg('format');
if (!strlen($format_key)) {
throw new PhutilArgumentUsageException(
pht(
'Specify an export format with "--format".'));
}
$all_formats = PhabricatorExportFormat::getAllExportFormats();
$format = idx($all_formats, $format_key);
if (!$format) {
throw new PhutilArgumentUsageException(
pht(
'Unknown export format ("%s"). Known formats are: %s.',
$format_key,
implode(', ', array_keys($all_formats))));
}
if (!$format->isExportFormatEnabled()) {
throw new PhutilArgumentUsageException(
pht(
'Export format ("%s") is not enabled.',
$format_key));
}
$is_overwrite = $args->getArg('overwrite');
$output_path = $args->getArg('output');
if (!strlen($output_path)) {
throw new PhutilArgumentUsageException(
pht(
'Use "--output <path>" to specify an output file, or "--output -" '.
'to print to stdout.'));
}
if ($output_path === '-') {
$is_stdout = true;
} else {View on GitHub (pinned to 5720a38cfe)
Solutions
- Switch to an enabled format (csv is the baseline)
- If the format class is your own, make isExportFormatEnabled() return true in the extension
- Check the format list and each format's enabled state before scripting an export pipeline
Example fix
// before: custom format always disabled
public function isExportFormatEnabled() {
return false;
}
// after: enable the format in your extension
public function isExportFormatEnabled() {
return true;
} Defensive patterns
Strategy: validation
Validate before calling
// Prefer a format that is registered AND enabled.
$all_formats = PhabricatorExportFormat::getAllExportFormats();
foreach (array('csv', $format_key) as $key) {
if (isset($all_formats[$key]) && $all_formats[$key]->isExportFormatEnabled()) {
$format = $all_formats[$key];
break;
}
} Prevention
- Call isExportFormatEnabled() on the chosen format before exporting
- For custom formats, keep the enabled flag on unless there is a reason to disable
When it happens
Trigger: Passing --format with a key whose PhabricatorExportFormat subclass exists in the registry but reports itself disabled.
Common situations: Version upgrades that disable a previously usable format; experimental formats disabled by default; custom formats whose enable hook was left off.
Related errors
- Specify an export format with "--format".
- Unknown export format ("%s"). Known formats are: %s.
- You must specify the path to a public keyfile with %s.
- You must specify the path to a pkcs8 keyfile with %s.
- You must specify the username of the account to recover.
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/656cbdb4e9476b6b.
Report an issue: GitHub.