phacility/phabricator · error · Exception
Project colors must have unique keys, but two icons share…
Error message
Project colors must have unique keys, but two icons share the same key ("%s"). What it means
Fires in validateColorConfiguration when two color entries share the same 'key'. Color keys must be unique within the projects.icons configuration, so the duplicate key (note the message says 'icons' — an upstream wording quirk) is rejected during config validation.
Solutions
- Remove or rename the duplicate color entry so all keys are unique.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/applications/project/icon/PhabricatorProjectIconSet.php:475 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/3acf05da08885e09.
Report an issue: GitHub.
Appendix: source
Thrown at src/applications/project/icon/PhabricatorProjectIconSet.php:475
));
$key = $value['key'];
if (!isset($available_keys[$key])) {
throw new Exception(
pht(
'Color key "%s" is not a valid color key. The supported color '.
'keys are: %s.',
$key,
implode(', ', $available_keys)));
}
}
$default = null;
$keys = array();
foreach ($config as $idx => $value) {
$key = $value['key'];
if (isset($keys[$key])) {
throw new Exception(
pht(
'Project colors must have unique keys, but two icons share the '.
'same key ("%s").',
$key));
} else {
$keys[$key] = true;
}
if (idx($value, 'default')) {
if ($default === null) {
$default = $value;
} else {
$original_key = $default['key'];
throw new Exception(
pht(
'Two different colors ("%s", "%s") are marked as the default '.
'color. Only one color may be marked as the default.',
$key,View on GitHub (pinned to 5720a38cfe)