If I have an address field with just a 'postal_code' and 'locality' field, changing the country will trigger Address::clearValues() which then adds empty children to the element for 'dependent_locality', 'administrative_area' and 'sorting_code'. This is problematic when you try to theme an address field because these "ghost elements" will be detected by Element::getVisibleChildren().

Fix coming shortly.

CommentFileSizeAuthor
#2 address-3057840-2.patch1.11 KBkristiaanvandeneynde

Comments

kristiaanvandeneynde created an issue. See original summary.

kristiaanvandeneynde’s picture

Status: Active » Needs review
StatusFileSize
new1.11 KB

Not sure if something so small requires a test. But here's what fixed it for me.

bojanz’s picture

Status: Needs review » Fixed

Committed, thank you!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.