{"record":{"id":"bef996cdc09cc57c","repo":"phacility/phabricator","slug":"failed-to-load-favicon-template-builtin-s","errorCode":null,"errorMessage":"Failed to load favicon template builtin \"%s\".","messagePattern":"Failed to load favicon template builtin \"(.+?)\"\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/files/favicon/PhabricatorFaviconRef.php","lineNumber":420,"sourceCode":"          pht(\n            'Found no template resource (for emblem \"%s\") with dimensions '.\n            '%dx%d.',\n            $emblem,\n            $width,\n            $height));\n      }\n    }\n\n    $scores = msortv($scores, 'getSelf');\n    $best_score = head_key($scores);\n\n    $viewer = $this->getViewer();\n\n    $resource = $all_resources[$best_score];\n    if ($resource['source-type'] === 'builtin') {\n      $file = PhabricatorFile::loadBuiltin($viewer, $resource['source']);\n      if (!$file) {\n        throw new Exception(\n          pht(\n            'Failed to load favicon template builtin \"%s\".',\n            $resource['source']));\n      }\n    } else {\n      $file = id(new PhabricatorFileQuery())\n        ->setViewer($viewer)\n        ->withPHIDs(array($resource['source']))\n        ->executeOne();\n      if (!$file) {\n        throw new Exception(\n          pht(\n            'Failed to load favicon template with PHID \"%s\".',\n            $resource['source']));\n      }\n    }\n\n    return array(","sourceCodeStart":402,"sourceCodeEnd":438,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/files/favicon/PhabricatorFaviconRef.php#L402-L438","documentation":"The selected favicon template is a Celerity builtin (source-type 'builtin'); PhabricatorFile::loadBuiltin($viewer, $resource['source']) returned no file, meaning the builtin by that name could not be loaded or generated. The template map references a builtin resource that does not actually exist in the builtin registry.","triggerScenarios":"A favicon template whose 'source' names a builtin that is not registered — a typo, a builtin removed or renamed during an upgrade, or a custom builtin whose registration is missing.","commonSituations":"Upgrades that rename or delete builtins while custom favicon config keeps the old name; forks adding template entries pointing at never-registered builtins.","solutions":["Correct the resource 'source' to a builtin that exists (verify the name against the Celerity builtin map / resources/builtin directory)","If it is a genuinely new builtin, register its file so loadBuiltin() can produce it","After fixing, re-request the favicon to bypass any cached failure"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"$file = PhabricatorFile::loadBuiltin($viewer, $resource['source']);\nif (!$file) {\n  // builtin missing: skip this template entry instead of throwing\n}","typeGuard":null,"tryCatchPattern":"catch Exception, log the missing builtin name, and fall back to another registered template for the same dimensions.","preventionTips":["Keep favicon template maps in sync with shipped builtins after every upgrade","Register custom builtins before referencing them in template configuration"],"tags":["favicon","builtin-resource","celerity","dangling-reference"],"backgroundTag":"missing-builtin-resource","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}