{"record":{"id":"f83574696ff05c61","repo":"phacility/phabricator","slug":"when-moving-objects-between-columns-on-a-board-co","errorCode":null,"errorMessage":"When moving objects between columns on a board, columns must be identified by PHIDs. This transaction uses \"%s\" to identify a column, but that is not a valid column PHID.","messagePattern":"When moving objects between columns on a board, columns must be identified by PHIDs\\. This transaction uses \"(.+?)\" to identify a column, but that is not a valid column PHID\\.","errorType":"validation","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/maniphest/editor/ManiphestTransactionEditor.php","lineNumber":765,"sourceCode":"    }\n\n    $engine->queueAddPosition(\n      $board_phid,\n      $column_phid,\n      $object_phid,\n      $after_phids,\n      $before_phids);\n\n    $engine->applyPositionUpdates();\n  }\n\n\n  private function validateColumnPHID($value) {\n    if (phid_get_type($value) == PhabricatorProjectColumnPHIDType::TYPECONST) {\n      return;\n    }\n\n    throw new Exception(\n      pht(\n        'When moving objects between columns on a board, columns must '.\n        'be identified by PHIDs. This transaction uses \"%s\" to identify '.\n        'a column, but that is not a valid column PHID.',\n        $value));\n  }\n\n\n  private function getLockValidationErrors($object, array $xactions) {\n    $errors = array();\n\n    $old_owner = $object->getOwnerPHID();\n    $old_status = $object->getStatus();\n\n    $new_owner = $old_owner;\n    $new_status = $old_status;\n\n    $owner_xaction = null;","sourceCodeStart":747,"sourceCodeEnd":783,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/maniphest/editor/ManiphestTransactionEditor.php#L747-L783","documentation":"validateColumnPHID() runs during transaction validation for column moves: every column reference must be a real PHID whose type constant equals PhabricatorProjectColumnPHIDType::TYPECONST (prefix PHID-PCD-). phid_get_type() on the supplied value returned something else, so the editor rejects the transaction before touching the board. Typical wrong values: a numeric column ID, a monogram, or a project PHID.","triggerScenarios":"Calling maniphest.edit (Conduit), the editor directly, or any move spec where 'columnPHID' is not a column PHID - e.g. '12' (raw ID), a board/project PHID (PHID-PROJ-...), or a malformed/hand-typed PHID string. The check is purely type-based; it fires before the existence check in error 880.","commonSituations":"Scripts migrated from older APIs that identified columns by numeric ID; copy-pasting the board's project PHID instead of the column's PHID; client code constructing PHIDs by string concatenation or guessing the prefix.","solutions":["Use the column's real PHID (starts with PHID-PCD-). Get it from 'project.column.search' (Conduit) or $column->getPHID().","If you only have a numeric ID, resolve it first: id(new PhabricatorProjectColumnQuery())->setViewer($viewer)->withIDs(array($id))->executeOne(), then use getPHID().","Check the prefix you are passing: PHID-PROJ- is a project/board, PHID-PCD- is a column - passing the board PHID is the classic mistake."],"exampleFix":"// before: raw numeric column ID\n->setNewValue(array('columnPHID' => $column_id));\n\n// after: resolve the ID to a real column PHID\n$column = id(new PhabricatorProjectColumnQuery())\n  ->setViewer($viewer)\n  ->withIDs(array($column_id))\n  ->executeOne();\nif (!$column) {\n  throw new Exception('No such column ID '.$column_id);\n}\n->setNewValue(array('columnPHID' => $column->getPHID()));","handlingStrategy":"type-guard","validationCode":"foreach ($move_specs as $spec) {\n  if (!is_column_phid($spec['columnPHID'])) {\n    throw new InvalidArgumentException(\n      'columnPHID must be a PHID-PCD-... value, got '.$spec['columnPHID']);\n  }\n}","typeGuard":"function is_column_phid($phid) {\n  return phid_get_type($phid) === PhabricatorProjectColumnPHIDType::TYPECONST;\n}","tryCatchPattern":null,"preventionTips":["Treat PHIDs as opaque typed tokens - never construct or guess them; always fetch them from the API.","Client-side, validate the PHID-PCD- prefix before submitting a column edit."],"tags":["phabricator","maniphest","phid","validation","workboard"],"backgroundTag":"invalid-identifier-format","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}