Page MenuHomePhabricator

US addresses not displaying correctly on Summary page after updating
Closed, ResolvedPublic

Description

Ticket #1777673 and CIDs 63783409 and 68209875 show an issue where US addresses are not displayed on the Summary page after a country update. The address appears blank, though it exists when clicking into the address field in Civi. This issue only occurs with US—changing the country to another displays correctly, but switching back to the US hides it again.

This behavior delays our ticket-solving process, as we have to manually check the address field for each affected CID to confirm the country. Please see the screenshots below:

Screenshot 2025-11-21 at 11.59.15 AM.png (171×1 px, 19 KB)

Screenshot 2025-11-21 at 11.59.24 AM.png (362×1 px, 38 KB)

Screenshot 2025-11-21 at 12.01.31 PM.png (283×1 px, 30 KB)

Event Timeline

@SHust I'm not sure I understand the bug here, as I've been unable to make this happen myself. Can you provide step by step instructions to replicate?

However, when trying to replicate, I have found that if you delete all of the address details except the country from an existing address, it deletes the address entirely which does not seem correct. This does not happen on the CiviCRM demo site, so it seems to be something of ours (and maybe related to your issue).

It does sound like this must be related to geocoding.

@Lars, I created CID 69158152: The country was originally set to France and appeared correctly on the summary page. After I changed it to the US and saved, the country field shows as blank on the summary. When you expand the address details, the US is there — it’s just not displaying properly in the summary view.

Screenshot 2025-11-26 at 12.59.38 PM.png (1×2 px, 292 KB)

Screenshot 2025-11-26 at 1.00.57 PM.png (500×1 px, 67 KB)

Screenshot 2025-11-26 at 1.00.16 PM.png (1×2 px, 294 KB)

Lars triaged this task as Medium priority.Nov 26 2025, 6:28 PM
Lars moved this task from Backlog to User Bug Backlog on the Fundraising Tech - Chaos Crew board.

@SHust Thanks, I think we are seeing the same bug, which is more specifically that when an address has country = US, but no other data, it is deleted. If you try the same thing with a city included, you'll see the address isn't deleted. This is actually an upstream bug which is that if an address has no other data other than country and country = the default country, then the address is deleted.

I think what you're seeing when you expand the address details is actually just the default country showing up in a new address. I've checked in the database and the original address is definitely gone.

Change #1213567 had a related patch set uploaded (by Lars SG; author: Lars SG):

[wikimedia/fundraising/crm@master] Prevent deletion of addresses when country is default and no other values Merged upstream https://github.com/civicrm/civicrm-core/pull/34176

https://gerrit.wikimedia.org/r/1213567

Change #1213567 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Prevent deletion of addresses when country is default and no other values Merged upstream https://github.com/civicrm/civicrm-core/pull/34176

https://gerrit.wikimedia.org/r/1213567

@SHust This has been fixed. Note that if you try to create an address with only country = US it will still not work (this is upstream to prevent addresses from being created by mistake on the create new contact form), but now if you edit an address to make it country = US with no other data, it will save correctly.

Thanks for the update and for fixing the issue!

XenoRyet set Final Story Points to 2.