D11/Address 2.0: Administrative area ('province') not showing for Germany (DE), but works for 'state' (e.g. US)

Created on 8 August 2025, 17 days ago

Hi everyone,

I've encountered a reproducible issue with the Administrative area sub-field in Address 2.0 on Drupal 11.

Problem/Motivation

On a clean Drupal 11 installation with Address 2.0, the 'Administrative area' subfield does not render for countries where this field is defined as the province type, such as Germany (DE), Austria (AT), or Switzerland (CH).

However, it works correctly for countries where the type is state, such as the United States (US). This strongly suggests a regression in how subdivision types are handled in the new version.

Steps to Reproduce

Install a clean Drupal 11.x site.

Run composer require 'drupal/address:^2.0' and enable the module.

Create a new content type (e.g., "Test Location").

Add an Address field to this content type.

In the field's settings, set the "Default country" to "Germany".

In the field's settings, under "Used address fields", ensure "Administrative area" is set to "Optional" or "Required".

Save the field configuration.

Go to the node creation form (/node/add/test_location).

Result: Observe that the 'Administrative area' (Bundesland) dropdown is missing, even though Germany is pre-selected.

Now, on the same form, manually change the country from "Germany" to "United States".

Result: Observe that the 'Administrative area' (State) dropdown appears instantly and is populated correctly.

Here is a screenshot showing the field appearing correctly for the US:

What is the expected behavior?

When a country with subdivisions of the type province (like Germany) is selected, the 'Administrative area' dropdown should be visible and populated, just as it is for countries with the state type.

What is the actual behavior?

The 'Administrative area' field remains hidden for Germany, but appears for the United States. This suggests a bug in the rendering logic for the province subdivision type in Address 2.0. This was tested and confirmed on a clean Drupal 11 installation to rule out any theme or module conflicts.

Even if I override the visibility of the subfields the problem remains, see screenshot:

Thanks for maintaining this great module!

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇩🇪Germany marco.b

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

Comments & Activities

Production build 0.71.5 2024