- Issue created by @marco.b
Hi everyone,
I've encountered a reproducible issue with the Administrative area sub-field in Address 2.0 on Drupal 11.
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.
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:
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.
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!
Active
2.0
Code