($dependentLocality) must be of type string, null

Created on 14 December 2023, over 1 year ago
Updated 1 January 2024, over 1 year ago

After updating to 2.0.0-beta3, editing any field in the address causes the error below and the WSOD.

TypeError: CommerceGuys\Addressing\Address::withDependentLocality(): Argument #1 ($dependentLocality) must be of type string, null given, called in /home/customer/www/mysite.com/public_html/modules/contrib/geocoder/modules/geocoder_address/src/AddressService.php on line 135 in CommerceGuys\Addressing\Address->withDependentLocality() (line 228 of /home/customer/www/mysite.com/public_html/vendor/commerceguys/addressing/src/Address.php).

At first I thought this was a Geocoder issue see https://www.drupal.org/project/geocoder/issues/3367781 🐛 TypeError: CommerceGuys\Addressing\Address::withDependentLocality(): Argument #1 ($dependentLocality) must be of type string, null given Postponed: needs info

But on one of mys sites affected. I rolled address back to Address 8.x-1.12 released 21 May 2023
The error went away, no problem.

On that site I was getting this error.

TypeError: CommerceGuys\Addressing\Address::withPostalCode(): Argument #1 ($postalCode) must be of type string, null given, called in /home/customer/www/myothersite.ca/public_html/modules/contrib/geocoder/modules/geocoder_address/src/AddressService.php on line 133 in CommerceGuys\Addressing\Address->withPostalCode() (line 247 of /home/customer/www/myothersite.ca/public_html/vendor/commerceguys/addressing/src/Address.php).

💬 Support request
Status

Fixed

Version

2.0

Component

Code

Created by

🇨🇦Canada dadderley Vancouver

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024