phacility/phabricator · error · PhutilArgumentUsageException

SearchEngine class ("%s") does not support data export.

Error message

SearchEngine class ("%s") does not support data export.

What it means

Even after the engine resolves, the export requires $engine->canExport() to be true; engines that never implemented data export fail here with the engine class named in the message. This check is also the gate that keeps non-exportable engines out of the --class candidate list, but a uniquely-matching or saved-query-derived engine still reaches it.

Source

Thrown at src/applications/transactions/bulk/management/PhabricatorBulkManagementExportWorkflow.php:277

    $engine_class = get_class($engine);

    foreach ($queries as $query) {
      $query_class = $query->getEngineClassName();
      if ($query_class !== $engine_class) {
        throw new PhutilArgumentUsageException(
          pht(
            'Specified queries use different engines: query "%s" uses '.
            'engine "%s", not "%s". All queries must run on the same '.
            'engine.',
            $query->getQueryKey(),
            $query_class,
            $engine_class));
      }
    }

    if (!$engine->canExport()) {
      throw new PhutilArgumentUsageException(
        pht(
          'SearchEngine class ("%s") does not support data export.',
          $engine_class));
    }

    return array($engine, $queries);
  }

  private function newUnionQuery(
    PhabricatorApplicationSearchEngine $engine,
    array $queries) {

    assert_instances_of($queries, 'PhabricatorSavedQuery');

    $engine = clone $engine;

    $ids = array();
    foreach ($queries as $saved_query) {

View on GitHub (pinned to 5720a38cfe)

Solutions

  1. Pick an engine from the supported list (trigger the sibling 'no engines match' error once to see all export-capable engines enumerated).
  2. For a custom engine, implement canExport() returning true plus the export field/row methods in the subclass.
  3. Export a different, supported object type and join the data downstream.

Example fix

// custom engine: opt in to data export
class MyThingSearchEngine extends PhabricatorApplicationSearchEngine {
  public function canExport() {
    return true;
  }
  // also implement the export field/row methods the export machinery calls
}
Defensive patterns

Strategy: validation

Type guard

// inside Phabricator tooling: probe the capability before exporting
function engineCanExport($engine_class) {
  if (!class_exists($engine_class)) {
    return false;
  }
  return (new $engine_class())->canExport();
}

Try / catch

Catch PhutilArgumentUsageException, match 'does not support data export', and route the user to the export-capable engine list.

Prevention

When it happens

Trigger: Naming a concrete engine class via --class that resolves uniquely but whose canExport() returns false; exporting a saved query whose engine does not support export.

Common situations: Attempting to export an application Phabricator never gave export support; custom application search engines whose subclass did not implement the export methods.

Related errors


AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21). Data as JSON: /api/errors/f8ddbab2c5266d74. Report an issue: GitHub.