phacility/phabricator · error · Exception
Monogram "%s" does not identify a valid object.
Error message
Monogram "%s" does not identify a valid object.
What it means
When the identifier is neither numeric nor a PHID-shaped string, PhabricatorEditEngine::newObjectFromIdentifier() tries to resolve it as a monogram (e.g. T123, D45) via PhabricatorObjectQuery->withNames(). This exception means the name resolver found no object at all for that monogram.
Source
Thrown at src/applications/transactions/editengine/PhabricatorEditEngine.php:746
if (phid_get_type($identifier) != $type_unknown) {
$object = $this->newObjectFromPHID($identifier, $capabilities);
if (!$object) {
throw new Exception(
pht(
'No object exists with PHID "%s".',
$identifier));
}
return $object;
}
$target = id(new PhabricatorObjectQuery())
->setViewer($this->getViewer())
->withNames(array($identifier))
->executeOne();
if (!$target) {
throw new Exception(
pht(
'Monogram "%s" does not identify a valid object.',
$identifier));
}
$expect = $this->newEditableObject();
$expect_class = get_class($expect);
$target_class = get_class($target);
if ($expect_class !== $target_class) {
throw new Exception(
pht(
'Monogram "%s" identifies an object of the wrong type. Loaded '.
'object has class "%s", but this editor operates on objects of '.
'type "%s".',
$identifier,
$target_class,
$expect_class));
}View on GitHub (pinned to 5720a38cfe)
Solutions
- Check the monogram resolves at all with conduit phid.lookup / phid.query before editing
- Confirm the application the monogram belongs to (T=Maniphest, D=Differential, P=Projects, ...) is installed and enabled on this instance
- Prefer IDs or PHIDs in machine-to-machine automation; reserve monograms for human input
- Wrap the edit call and treat this exception as 'invalid reference' input feedback
Example fix
// before
$parameters = array('objectIdentifier' => 'T999999', 'transactions' => $transactions);
$result = $client->callMethod('maniphest.edit', $parameters);
// Exception: Monogram "T999999" does not identify a valid object.
// after: resolve the monogram first, edit only if it exists
$lookup = $client->callMethod('phid.lookup', array('names' => array('T999999')));
if (empty($lookup['T999999'])) {
// report an invalid/unknown monogram to the caller
}
$result = $client->callMethod('maniphest.edit', $parameters); Defensive patterns
Strategy: validation
Validate before calling
// Resolve any monogram before handing it to an editor:
$lookup = $client->callMethod('phid.lookup', array('names' => array($monogram)));
if (empty($lookup[$monogram])) {
// unknown/invisible monogram; reject the input here
} Type guard
function isPlausibleMonogram($m) {
// e.g. T123, D4567, P12 — uppercase app letter(s) + digits
return is_string($m) && preg_match('/^[A-Z]{1,4}\d+\z/', $m);
} Try / catch
try {
$result = $client->callMethod('maniphest.edit', $parameters);
} catch (ConduitClientException $ex) {
if (strpos($ex->getMessage(), 'does not identify a valid object') !== false) {
// surface 'unknown reference' to the user instead of crashing
} else {
throw $ex;
}
} Prevention
- Validate user-supplied monograms with phid.lookup before using them in edits
- Prefer IDs or PHIDs for machine inputs; monograms are for humans
- Confirm the target application is installed before accepting its monograms
When it happens
Trigger: Passing objectIdentifier="T999999" (or any monogram of an object that does not exist or is not visible) to an edit-engine Conduit method or /edit/ URL; using a monogram for an application that is not installed/enabled on this instance.
Common situations: Users hand-typing a monogram in a URL or automation script with a typo; migrating content between instances where the monogram refers to an object that was never created; referencing monograms of disabled/uninstalled applications; monograms case-mangled by tooling.
Related errors
- No object exists with ID "%s".
- No object exists with PHID "%s".
- Monogram "%s" identifies an object of the wrong type. Loaded
- Failed to reload object identified by monogram "%s" when que
- Service type "%s" is unrecognized. Valid types are: %s.
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/7dbf5277b213a4c4.
Report an issue: GitHub.