phacility/phabricator · error · Exception

Unable to load changeset.

Error message

Unable to load changeset.

What it means

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.

Source

Thrown at src/applications/differential/controller/DifferentialInlineCommentEditController.php:82

    return id(new DifferentialInlineComment())
      ->setRevision($revision)
      ->setChangesetID($changeset_id);
  }

  protected function loadCommentForDone($id) {
    $viewer = $this->getViewer();

    $inline = $this->loadCommentByID($id);
    if (!$inline) {
      throw new Exception(pht('Unable to load inline "%d".', $id));
    }

    $changeset = id(new DifferentialChangesetQuery())
      ->setViewer($viewer)
      ->withIDs(array($inline->getChangesetID()))
      ->executeOne();
    if (!$changeset) {
      throw new Exception(pht('Unable to load changeset.'));
    }

    $diff = id(new DifferentialDiffQuery())
      ->setViewer($viewer)
      ->withIDs(array($changeset->getDiffID()))
      ->executeOne();
    if (!$diff) {
      throw new Exception(pht('Unable to load diff.'));
    }

    $revision = id(new DifferentialRevisionQuery())
      ->setViewer($viewer)
      ->withIDs(array($diff->getRevisionID()))
      ->executeOne();
    if (!$revision) {
      throw new Exception(pht('Unable to load revision.'));
    }

View on GitHub (pinned to 5720a38cfe)

Solutions

  1. Repair or remove the orphaned inline comment rows; this is a data integrity issue, not a client bug.
  2. Involve the instance admin; normal Phabricator flows keep these rows consistent.
  3. Avoid manual database surgery on differential tables without cleaning dependent rows.
Defensive patterns

Strategy: try-catch

Try / catch

try {
  // perform the inline comment action
} catch (Exception $ex) {
  if (preg_match('/Unable to load changeset/', $ex->getMessage())) {
    // orphaned inline: surface to the admin for data repair
  } else {
    throw $ex;
  }
}

Prevention

When it happens

Trigger: An inline comment whose changeset was deleted — for example diff cleanup or manual storage repair — while the comment row survived.

Common situations: Database repairs that removed diffs or changesets without purging inline comments; long-lived draft comments left behind after aggressive cleanup.

Related errors


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