{"record":{"id":"cd3e01f3bf6017d1","repo":"phacility/phabricator","slug":"this-diff-s-is-associated-with-a-repository","errorCode":null,"errorMessage":"This diff (\"%s\") is associated with a repository (\"%s\") which could not be loaded.","messagePattern":"This diff \\(\"(.+?)\"\\) is associated with a repository \\(\"(.+?)\"\\) which could not be loaded\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/differential/storage/DifferentialDiff.php","lineNumber":591,"sourceCode":"\n\n  public function getCircleCIGitHubRepositoryURI() {\n    $diff_phid = $this->getPHID();\n    $repository_phid = $this->getRepositoryPHID();\n    if (!$repository_phid) {\n      throw new Exception(\n        pht(\n          'This diff (\"%s\") is not associated with a repository. A diff '.\n          'must belong to a tracked repository to be built by CircleCI.',\n          $diff_phid));\n    }\n\n    $repository = id(new PhabricatorRepositoryQuery())\n      ->setViewer(PhabricatorUser::getOmnipotentUser())\n      ->withPHIDs(array($repository_phid))\n      ->executeOne();\n    if (!$repository) {\n      throw new Exception(\n        pht(\n          'This diff (\"%s\") is associated with a repository (\"%s\") which '.\n          'could not be loaded.',\n          $diff_phid,\n          $repository_phid));\n    }\n\n    $staging_uri = $repository->getStagingURI();\n    if (!$staging_uri) {\n      throw new Exception(\n        pht(\n          'This diff (\"%s\") is associated with a repository (\"%s\") that '.\n          'does not have a Staging Area configured. You must configure a '.\n          'Staging Area to use CircleCI integration.',\n          $diff_phid,\n          $repository_phid));\n    }\n","sourceCodeStart":573,"sourceCodeEnd":609,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/differential/storage/DifferentialDiff.php#L573-L609","documentation":"Data-integrity failure in DifferentialDiff::getCircleCIGitHubRepositoryURI: the diff does carry a repository PHID, but the omnipotent PhabricatorRepositoryQuery lookup for that PHID returned no row. The referenced repository record is missing or unloadable (deleted, unreachable storage), so the staging URI needed for CircleCI cannot be resolved.","triggerScenarios":"Thrown at src/applications/differential/storage/DifferentialDiff.php:591 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check whether the repository still exists in Phabricator (Repositories application) and was not deleted","Repair the diff's repository PHID if it is stale or points at a nonexistent object","If the repository was recreated with a new PHID, re-create the diff/revision against the new repository"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","contentChangedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}