{"record":{"id":"20832f9cf569e5b3","repo":"phacility/phabricator","slug":"unable-to-load-changeset","errorCode":null,"errorMessage":"Unable to load changeset.","messagePattern":"Unable to load changeset\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/differential/controller/DifferentialInlineCommentEditController.php","lineNumber":82,"sourceCode":"    return id(new DifferentialInlineComment())\n      ->setRevision($revision)\n      ->setChangesetID($changeset_id);\n  }\n\n  protected function loadCommentForDone($id) {\n    $viewer = $this->getViewer();\n\n    $inline = $this->loadCommentByID($id);\n    if (!$inline) {\n      throw new Exception(pht('Unable to load inline \"%d\".', $id));\n    }\n\n    $changeset = id(new DifferentialChangesetQuery())\n      ->setViewer($viewer)\n      ->withIDs(array($inline->getChangesetID()))\n      ->executeOne();\n    if (!$changeset) {\n      throw new Exception(pht('Unable to load changeset.'));\n    }\n\n    $diff = id(new DifferentialDiffQuery())\n      ->setViewer($viewer)\n      ->withIDs(array($changeset->getDiffID()))\n      ->executeOne();\n    if (!$diff) {\n      throw new Exception(pht('Unable to load diff.'));\n    }\n\n    $revision = id(new DifferentialRevisionQuery())\n      ->setViewer($viewer)\n      ->withIDs(array($diff->getRevisionID()))\n      ->executeOne();\n    if (!$revision) {\n      throw new Exception(pht('Unable to load revision.'));\n    }\n","sourceCodeStart":64,"sourceCodeEnd":100,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/differential/controller/DifferentialInlineCommentEditController.php#L64-L100","documentation":"After the inline comment loads, its changeset is loaded; if the changeset row is gone the controller throws 'Unable to load changeset'. This indicates damaged or orphaned data rather than a bad request: the inline points at a changeset that no longer exists.","triggerScenarios":"An inline comment whose changeset was deleted — for example diff cleanup or manual storage repair — while the comment row survived.","commonSituations":"Database repairs that removed diffs or changesets without purging inline comments; long-lived draft comments left behind after aggressive cleanup.","solutions":["Repair or remove the orphaned inline comment rows; this is a data integrity issue, not a client bug.","Involve the instance admin; normal Phabricator flows keep these rows consistent.","Avoid manual database surgery on differential tables without cleaning dependent rows."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  // perform the inline comment action\n} catch (Exception $ex) {\n  if (preg_match('/Unable to load changeset/', $ex->getMessage())) {\n    // orphaned inline: surface to the admin for data repair\n  } else {\n    throw $ex;\n  }\n}","preventionTips":["Never delete diff or changeset rows without purging their inline comments.","Run integrity checks after any direct database maintenance.","Report repeat occurrences to the instance admin; this shape is data damage, not user error."],"tags":["phabricator","differential","inline-comment","data-integrity"],"backgroundTag":"orphaned-reference","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}