{"record":{"id":"656cbdb4e9476b6b","repo":"phacility/phabricator","slug":"export-format-s-is-not-enabled","errorCode":null,"errorMessage":"Export format (\"%s\") is not enabled.","messagePattern":"Export format \\(\"(.+?)\"\\) is not enabled\\.","errorType":"console","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"warning","filePath":"src/applications/transactions/bulk/management/PhabricatorBulkManagementExportWorkflow.php","lineNumber":71,"sourceCode":"    $format_key = $args->getArg('format');\n    if (!strlen($format_key)) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'Specify an export format with \"--format\".'));\n    }\n\n    $all_formats = PhabricatorExportFormat::getAllExportFormats();\n    $format = idx($all_formats, $format_key);\n    if (!$format) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'Unknown export format (\"%s\"). Known formats are: %s.',\n          $format_key,\n          implode(', ', array_keys($all_formats))));\n    }\n\n    if (!$format->isExportFormatEnabled()) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'Export format (\"%s\") is not enabled.',\n          $format_key));\n    }\n\n    $is_overwrite = $args->getArg('overwrite');\n    $output_path = $args->getArg('output');\n\n    if (!strlen($output_path)) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'Use \"--output <path>\" to specify an output file, or \"--output -\" '.\n          'to print to stdout.'));\n    }\n\n    if ($output_path === '-') {\n      $is_stdout = true;\n    } else {","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/transactions/bulk/management/PhabricatorBulkManagementExportWorkflow.php#L53-L89","documentation":"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.","triggerScenarios":"Passing --format with a key whose PhabricatorExportFormat subclass exists in the registry but reports itself disabled.","commonSituations":"Version upgrades that disable a previously usable format; experimental formats disabled by default; custom formats whose enable hook was left off.","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"],"exampleFix":"// before: custom format always disabled\npublic function isExportFormatEnabled() {\n  return false;\n}\n\n// after: enable the format in your extension\npublic function isExportFormatEnabled() {\n  return true;\n}","handlingStrategy":"validation","validationCode":"// Prefer a format that is registered AND enabled.\n$all_formats = PhabricatorExportFormat::getAllExportFormats();\nforeach (array('csv', $format_key) as $key) {\n  if (isset($all_formats[$key]) && $all_formats[$key]->isExportFormatEnabled()) {\n    $format = $all_formats[$key];\n    break;\n  }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Call isExportFormatEnabled() on the chosen format before exporting","For custom formats, keep the enabled flag on unless there is a reason to disable"],"tags":["cli","usage","export","format","disabled-feature"],"backgroundTag":"export-format-disabled","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}