phacility/phabricator · error · Exception
Failed to load favicon template with PHID "%s".
Error message
Failed to load favicon template with PHID "%s".
What it means
The selected favicon template references a concrete PhabricatorFile by PHID; the PhabricatorFileQuery executed with the acting viewer returned no file. Either the file record was deleted while the template map still references its PHID, or the file's visibility policy hides it from the viewer doing the favicon rendering.
Source
Thrown at src/applications/files/favicon/PhabricatorFaviconRef.php:431
$viewer = $this->getViewer();
$resource = $all_resources[$best_score];
if ($resource['source-type'] === 'builtin') {
$file = PhabricatorFile::loadBuiltin($viewer, $resource['source']);
if (!$file) {
throw new Exception(
pht(
'Failed to load favicon template builtin "%s".',
$resource['source']));
}
} else {
$file = id(new PhabricatorFileQuery())
->setViewer($viewer)
->withPHIDs(array($resource['source']))
->executeOne();
if (!$file) {
throw new Exception(
pht(
'Failed to load favicon template with PHID "%s".',
$resource['source']));
}
}
return array(
'width' => $resource['width'],
'height' => $resource['height'],
'file' => $file,
);
}
private function newFaviconFile($data) {
return PhabricatorFile::newFromFileData(
$data,
array(
'name' => 'favicon',View on GitHub (pinned to 5720a38cfe)
Solutions
- Re-upload the template image and update the favicon configuration to the new PHID
- Or adjust the file's policy so the viewer performing favicon rendering can see it
- Remove the stale template entry if that emblem/template is no longer used
Defensive patterns
Strategy: validation
Validate before calling
$file = id(new PhabricatorFileQuery())
->setViewer($viewer)
->withPHIDs(array($resource['source']))
->executeOne();
if (!$file) {
// template file deleted or invisible: skip this template
} Try / catch
catch Exception and fall back to the default (builtin) favicon template when a PHID-backed template fails to load.
Prevention
- Store favicon template files under stable, always-visible policies
- Audit favicon configuration for PHID references before deleting any files
When it happens
Trigger: Deleting (or making private) a file used as a favicon template while configuration still points at its PHID; the favicon render runs as a viewer whose policies exclude the file.
Common situations: An emblem image uploaded then later cleaned up by an admin; policy changes locking files to a project; configuration referencing PHIDs from another instance after a partial migration.
Related errors
- Failed to load favicon template builtin "%s".
- Capability "%s" has invalid policy "%s"; "%s" does not exist
- Failed to load import with PHID "%s".
- Diff "%s" does not exist!
- Some of the Almanac Services defined by this blueprint could
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/022b9479e9c270bb.
Report an issue: GitHub.