{"record":{"id":"31c88497627275fc","repo":"phacility/phabricator","slug":"you-can-not-accept-this-revision-because-it-has-al","errorCode":null,"errorMessage":"You can not accept this revision because it has already been closed. Only open revisions can be accepted.","messagePattern":"You can not accept this revision because it has already been closed\\. Only open revisions can be accepted\\.","errorType":"validation","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/differential/xaction/DifferentialRevisionAcceptTransaction.php","lineNumber":162,"sourceCode":"      array_select_keys($options, $tail);\n\n    return array($options, $value);\n  }\n\n  public function generateOldValue($object) {\n    $actor = $this->getActor();\n    return $this->isViewerFullyAccepted($object, $actor);\n  }\n\n  public function applyExternalEffects($object, $value) {\n    $status = DifferentialReviewerStatus::STATUS_ACCEPTED;\n    $actor = $this->getActor();\n    $this->applyReviewerEffect($object, $actor, $value, $status);\n  }\n\n  protected function validateAction($object, PhabricatorUser $viewer) {\n    if ($object->isClosed()) {\n      throw new Exception(\n        pht(\n          'You can not accept this revision because it has already been '.\n          'closed. Only open revisions can be accepted.'));\n    }\n\n    if ($object->isDraft() || !$object->getShouldBroadcast()) {\n      throw new Exception(\n        pht('You can not accept a draft revision.'));\n    }\n\n    $config_key = 'differential.allow-self-accept';\n    if (!PhabricatorEnv::getEnvConfig($config_key)) {\n      if ($this->isViewerRevisionAuthor($object, $viewer)) {\n        throw new Exception(\n          pht(\n            'You can not accept this revision because you are the revision '.\n            'author. You can only accept revisions you do not own. You can '.\n            'change this behavior by adjusting the \"%s\" setting in Config.',","sourceCodeStart":144,"sourceCodeEnd":180,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/differential/xaction/DifferentialRevisionAcceptTransaction.php#L144-L180","documentation":"State-machine guard inside DifferentialRevisionAcceptTransaction::validateAction(): the accept action is rejected because the revision is in a closed status (published/landed or abandoned). Accepting a review only makes sense while the revision is open, so once the status is closed the accept transition is permanently disallowed.","triggerScenarios":"Thrown at src/applications/differential/xaction/DifferentialRevisionAcceptTransaction.php:162 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the revision status; if it has already been accepted and closed by landing, the review is complete and no accept is needed","If code changed after closure, request a new revision or reopen the discussion with the author rather than accepting the closed one","Ensure you are operating on the intended revision (correct D-id) since stale UI pages often offer actions that are no longer valid"],"exampleFix":null,"handlingStrategy":"validation","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"}