The address gets #available_countries => ['US'] and a French address. It shows a country dropdown with FR and US. But switching from FR to US crashes ajax.

This is a regression introduced in 1.0 when we added the country element, it worked previously, but is obviously lacking test coverage.

Comments

bojanz created an issue. See original summary.

  • bojanz committed 251c146 on 8.x-1.x
    Issue #2908575 by bojanz: Crash when there's only one available country...

  • bojanz committed 034924a on 8.x-1.x
    Issue #2908575 followup: Apply the same fix to ZoneTerritory.
    
bojanz’s picture

Status: Active » Fixed

Added a test, fixed it in Address (we needed to pass the element's #default_value down to the country, not the #value), tweaked Zone to ensure code looks similar.

  • bojanz committed 89fbd98 on 8.x-1.x
    Issue #2908575 followup: Guard against incomplete , fix langcode notice.
    
bojanz’s picture

Status: Fixed » Needs work

My guard against broken $input broke optional address fields.

  • bojanz committed c6a3d22 on 8.x-1.x
    Issue #2908575 followup: Limit the incomplete input workaround to...
bojanz’s picture

Status: Needs work » Fixed

Fourth time's the charm?

Status: Fixed » Closed (fixed)

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