{"record":{"id":"7e87e690419d219f","repo":"phacility/phabricator","slug":"in-call-to-transaction-search-selected-object","errorCode":null,"errorMessage":"In call to \"transaction.search\", selected object (of type \"%s\") does not implement \"%s\", so transactions can not be loaded for it.","messagePattern":"In call to \"transaction\\.search\", selected object \\(of type \"(.+?)\"\\) does not implement \"(.+?)\", so transactions can not be loaded for it\\.","errorType":"validation","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/transactions/conduit/TransactionSearchConduitAPIMethod.php","lineNumber":406,"sourceCode":"      }\n\n      $object = $all_types[$object_type]->newObject();\n    } else {\n      $object = id(new PhabricatorObjectQuery())\n        ->setViewer($viewer)\n        ->withNames(array($object_identifier))\n        ->executeOne();\n      if (!$object) {\n        throw new Exception(\n          pht(\n            'In call to \"transaction.search\", specified \"objectIdentifier\" '.\n            '(\"%s\") does not exist.',\n            $object_identifier));\n      }\n    }\n\n    if (!($object instanceof PhabricatorApplicationTransactionInterface)) {\n      throw new Exception(\n        pht(\n          'In call to \"transaction.search\", selected object (of type \"%s\") '.\n          'does not implement \"%s\", so transactions can not be loaded for it.',\n          get_class($object),\n          'PhabricatorApplicationTransactionInterface'));\n    }\n\n    return $object;\n  }\n\n}\n","sourceCodeStart":388,"sourceCodeEnd":418,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/transactions/conduit/TransactionSearchConduitAPIMethod.php#L388-L418","documentation":"After the template object resolves (from objectType or objectIdentifier), it must implement PhabricatorApplicationTransactionInterface for transaction.search to load its timeline; otherwise this Exception names both the concrete class and the interface. This is an API-shape limitation, not a permissions problem — some PHID-bearing objects (users, repositories, config records) simply have no application transaction timeline.","triggerScenarios":"Passing objectType USER or a repository object to transaction.search; querying custom objects that store history without application transactions.","commonSituations":"Assuming every searchable object has a transaction timeline; porting scripts from per-application detail APIs to the generic transaction.search method.","solutions":["Use the application's own conduit API for non-transactional objects (e.g. user.search, repository.search).","For custom applications, implement PhabricatorApplicationTransactionInterface and the associated transaction query to opt in.","Target transactional objects: tasks, revisions, pastes, and other edit-screen-backed objects."],"exampleFix":"// custom record: opt in to transaction timelines\nclass MyThing extends MyThingDAO\n  implements PhabricatorApplicationTransactionInterface {\n\n  public function getApplicationTransactionEditorHandler() {\n    return new MyThingTransactionEditor();\n  }\n  public function getApplicationTransactionTemplate() {\n    return new MyThingTransaction();\n  }\n}","handlingStrategy":"type-guard","validationCode":"// PHP: before calling, resolve the template and check the interface\n$object = resolveTemplateObject($viewer, $object_type, $object_identifier);\nif (!($object instanceof PhabricatorApplicationTransactionInterface)) {\n  // route to the application-specific API instead of transaction.search\n}","typeGuard":"// PHP\nfunction hasTransactions($object) {\n  return $object instanceof PhabricatorApplicationTransactionInterface;\n}","tryCatchPattern":"Catch the conduit error client-side, match 'does not implement', and fall back to the owning application's own search/read conduit method for that object type.","preventionTips":["Maintain a map of object type -> correct conduit API in client code.","Assume only edit-screen-backed objects (tasks, revisions, pastes) have transaction timelines."],"tags":["phabricator","conduit","transaction-search","interface"],"backgroundTag":"interface-not-implemented","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}