phacility/phabricator · error · Exception
Invalid path ID!
Error message
Invalid path ID!
What it means
A generic sentinel guard in createComment: the code looks up the repository path row (PhabricatorRepository::TABLE_PATH) by the changeset ID supplied with the request, and queryfx_one returned no row. It fires when the client submits an inline comment request whose path/changeset ID does not exist in the database (stale, forged, or from another repository).
Solutions
- Verify the changeset/path ID being submitted actually exists for the target commit
- Reload the diff view to obtain fresh, valid changeset IDs
- Check for mismatched repository or commit context in the request
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/applications/diffusion/controller/DiffusionInlineCommentController.php:44 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/1fdb687dd72a1062.
Report an issue: GitHub.
Appendix: source
Thrown at src/applications/diffusion/controller/DiffusionInlineCommentController.php:44
if (!$commit) {
throw new Exception(pht('Invalid commit PHID "%s"!', $commit_phid));
}
return $commit;
}
protected function createComment() {
$commit = $this->loadCommit();
// TODO: Write a real PathQuery object?
$path_id = $this->getChangesetID();
$path = queryfx_one(
id(new PhabricatorRepository())->establishConnection('r'),
'SELECT path FROM %T WHERE id = %d',
PhabricatorRepository::TABLE_PATH,
$path_id);
if (!$path) {
throw new Exception(pht('Invalid path ID!'));
}
return id(new PhabricatorAuditInlineComment())
->setCommitPHID($commit->getPHID())
->setPathID($path_id);
}
protected function loadCommentForDone($id) {
$viewer = $this->getViewer();
$inline = $this->loadCommentByID($id);
if (!$inline) {
throw new Exception(pht('Failed to load comment "%d".', $id));
}
$commit = id(new DiffusionCommitQuery())
->setViewer($viewer)
->withPHIDs(array($inline->getCommitPHID()))View on GitHub (pinned to 5720a38cfe)