Skip to content

[5.x]: "City" field in address slideout is incorrectly labelled/populated for UK addresses #15551

@peteeveleigh

Description

@peteeveleigh

What happened?

Ran into this on a project site earlier today, but just confirmed the behaviour on a brand new, clean install with no plugins other than Commerce installed.

Description

For UK Addresses, the "City" dropdown field in the Address slideout is populated with a weird mix of counties and cities and there is no "County" field

Screenshot 2024-08-17 at 01 10 53

For example, the dropdown contains both "Cardiff" which is a city, and "Worcestershire" which is a county.
Furthermore, many towns and cities are missing from the list, for example "Evesham" (a town in Worcestershire) so it's not possible to enter an accurate address.

As it is, it's pretty unusable.

It feels like a mix of 3 things.

  1. The "City" field should be labelled as "County"
  2. The contents of the dropdown should only be UK counties
  3. There should be a separate plain text field for "City"

Steps to reproduce

  1. Create a new address
  2. Select "United Kingdom" for the country
  3. Examine the "City" field.

Expected behavior

  1. The "City" field should be freetext - I don't think it's practical to have a pre-populated list of all the possible towns and cities in the UK.
  2. There should be a "County" field which is a dropdown of UK counties.

Actual behavior

  1. The "City" dropdown contains a mix of towns, cities, and counties with many omissions.
  2. There is no separate "County" field.

Craft CMS version

6.3.4

Craft Commerce version

5.0.16.2

PHP version

8.2.18

Operating system and version

Linux 6.6.32-linuxkit

Database type and version

MySQL 8.0.33

Image driver and version

No response

Installed plugins and versions

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions