{"record":{"id":"21a372a6f8080fc0","repo":"phacility/phabricator","slug":"column-move-transaction-specifies-column-phid-s","errorCode":null,"errorMessage":"Column move transaction specifies column PHID \"%s\", but there is no corresponding column with this PHID.","messagePattern":"Column move transaction specifies column PHID \"(.+?)\", but there is no corresponding column with this PHID\\.","errorType":"validation","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/maniphest/editor/ManiphestTransactionEditor.php","lineNumber":569,"sourceCode":"    $object_phids = array();\n    if ($object_phid) {\n      $object_phids[] = $object_phid;\n    }\n\n    if ($object_phids) {\n      $layout_engine = id(new PhabricatorBoardLayoutEngine())\n        ->setViewer($this->getActor())\n        ->setBoardPHIDs($board_phids)\n        ->setObjectPHIDs($object_phids)\n        ->setFetchAllBoards(true)\n        ->executeLayout();\n    }\n\n    foreach ($new as $key => $spec) {\n      $column_phid = $spec['columnPHID'];\n      $column = idx($columns, $column_phid);\n      if (!$column) {\n        throw new Exception(\n          pht(\n            'Column move transaction specifies column PHID \"%s\", but there '.\n            'is no corresponding column with this PHID.',\n            $column_phid));\n      }\n\n      $board_phid = $column->getProjectPHID();\n\n      if ($object_phid) {\n        $old_columns = $layout_engine->getObjectColumns(\n          $board_phid,\n          $object_phid);\n        $old_column_phids = mpull($old_columns, 'getPHID');\n      } else {\n        $old_column_phids = array();\n      }\n\n      $spec += array(","sourceCodeStart":551,"sourceCodeEnd":587,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/maniphest/editor/ManiphestTransactionEditor.php#L551-L587","documentation":"ManiphestTransactionEditor throws this while applying a workboard column-move transaction. It first loads every column named in the transaction via PhabricatorProjectColumnQuery->withPHIDs(...) scoped to the acting user (src/applications/maniphest/editor/ManiphestTransactionEditor.php:535-544), then requires each spec's 'columnPHID' to be present in that map. The PHID was well-formed but the query loaded nothing for it, so the editor refuses to record a move to a nonexistent column.","triggerScenarios":"Applying TYPE_COLUMN transactions (board drag-drop, maniphest.edit Conduit with 'column', or $editor->applyTransactions()) where 'columnPHID' refers to a column that was deleted between board load and submit, belongs to a board the acting user cannot see (withViewer applies policy filtering), or was copied from another install. Deleted/hidden columns are excluded from the loaded map even though the PHID string is valid.","commonSituations":"A stale browser tab keeps a board open, an admin deletes or hides the column meanwhile, and the user then drags a task into it; API scripts that hard-code column PHIDs captured from an old board export; passing a column PHID from a different Phabricator instance.","solutions":["Refresh the board and retry with current column data - the normal UI refetches columns per request; long-lived tabs are the usual source of stale PHIDs.","Verify the column still exists and is visible to the acting user (open the project's workboard; check column status and project policy).","If calling the API, fetch live columns first (e.g. 'project.column.search') and use one of the returned PHIDs instead of a stored or hard-coded value.","Confirm the PHID prefix is PHID-PCD- (a column) and belongs to this install, not a project PHID (PHID-PROJ-) or another instance's column."],"exampleFix":"// before: trust a PHID saved long ago\n$xactions[] = id(new ManiphestTransaction())\n  ->setTransactionType(ManiphestTransaction::TYPE_COLUMN)\n  ->setNewValue(array('columnPHID' => $stored_phid));\n\n// after: verify against the board's current columns, visible to the actor\n$columns = id(new PhabricatorProjectColumnQuery())\n  ->setViewer($viewer)\n  ->withProjectPHIDs(array($board_phid))\n  ->execute();\n$valid = mpull($columns, 'getPHID');\nif (!in_array($stored_phid, $valid)) {\n  $stored_phid = head($valid); // or abort and ask the client to reload\n}\n$xactions[] = id(new ManiphestTransaction())\n  ->setTransactionType(ManiphestTransaction::TYPE_COLUMN)\n  ->setNewValue(array('columnPHID' => $stored_phid));","handlingStrategy":"validation","validationCode":"// Before applying a column move, confirm the column loads for the actor.\n$columns = id(new PhabricatorProjectColumnQuery())\n  ->setViewer($viewer)\n  ->withPHIDs(array($spec['columnPHID']))\n  ->execute();\nif (!$columns) {\n  // reload board / pick a fresh column instead of submitting\n  throw new Exception('Column no longer exists or is not visible; reload the board.');\n}","typeGuard":null,"tryCatchPattern":"try {\n  $editor->applyTransactions($task, $xactions);\n} catch (Exception $ex) {\n  if (preg_match('/no corresponding column/', $ex->getMessage())) {\n    // surface 'reload the board' to the user instead of a raw stack\n  }\n  throw $ex;\n}","preventionTips":["Never persist column PHIDs across sessions; resolve them from the board at request time.","On drag-drop failure, refresh the board - the column list in the client is stale.","Expose 'project.column.search' to API consumers so they always submit live PHIDs."],"tags":["phabricator","maniphest","workboard","column-move","transaction","phid"],"backgroundTag":"referenced-entity-not-found","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}