diff --git a/CHANGELOG.md b/CHANGELOG.md index 65c1f91718b..b9020c31b88 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - Fixed a bug where SVG files missing their `width` and `height` attributes weren’t getting them set as expected. - Fixed an error that could occur when applying project config changes. ([#18477](https://github.com/craftcms/cms/issues/18477)) - Fixed a bug where Content Block fields’ nested values weren’t always getting set correctly via `resave` commands. ([#18453](https://github.com/craftcms/cms/issues/18453)) +- Fixed a bug where addresses without labels weren’t getting chip labels. ([#18481](https://github.com/craftcms/cms/issues/18481)) ## 5.9.14 - 2026-02-25 diff --git a/src/elements/Address.php b/src/elements/Address.php index 20ab789bfc9..9eebb3f6546 100644 --- a/src/elements/Address.php +++ b/src/elements/Address.php @@ -740,6 +740,21 @@ public function defineRules(): array return $rules; } + /** + * @inheritdoc + */ + public function getChipLabelHtml(): string + { + $html = parent::getChipLabelHtml(); + if ($html !== '') { + return $html; + } + + return Craft::t('app', 'Untitled {type}', [ + 'type' => self::lowerDisplayName(), + ]); + } + /** * @inheritdoc */