Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Configuration Language Lock 1.0.2 Minor update available for module config_language_lock (1.0.2). Release: Canvas Override 1.0.1 Minor update available for module canvas_override (1.0.1). Release: Media Remote Image 8.x-1.2 Minor update available for module media_entity_remote_image (8.x-1.2). Release: IDNA Convert Service (punycode) 2.0.4 Minor update available for module idna (2.0.4). Release: Bootstrap Cloud 7.1.3 Minor update available for theme bootstrap_cloud (7.1.3). Release: Token Browser 1.0.2 Minor update available for module token_browser (1.0.2). Release: Varbase Project 11.0.8 Minor update available for module varbase_project (11.0.8). Release: Media Remote Image 2.0.0-beta1 First beta version released for module media_entity_remote_image (2.0.0-beta1). Usage Milestone: Term CSV Export Import Module term_csv_export_import crossed 1,000 active installs. Security Coverage: Module Scout Module module_scout now has official Drupal security advisory coverage.

Address: Country unknown

1 sites No security coverage

Part of the Address ecosystem · 15 projects

View on drupal.org

This module extends the core Address module to allow users to enter and display addresses even when the country is unknown or not provided. It overrides the default behavior that requires a country selection, enabling input of partial addresses for cases where the country is not applicable or cannot be determined, and preventing data loss for migrated addresses missing country codes. However, it is noted as an "ugly workaround" and should be used with caution, especially avoiding it with Drupal Commerce.

Overview

The Address Country Unknown module is extending the functionality of the Address module. It provides custom widgets and formatters that allow users to enter, save, and display an address even when the country is (semantically) unknown = left empty (technically).

This is a(n ugly) workaround - take care!

The module implements a workaround that solves the issue of not being able to enter an address without country (because country may not be known in real-world scenarios and the address doesn't need to be complete in these cases, as it's just information text), but because the Address module does not support this (for some good reasons), the implementation is kind of ugly.

NEVER use this in combination with Drupal Commerce which heavily relies on complete addresses!

Do not use in production without reading the code and documentation carefully. (Only for developers who know what they're doing ;))

So probably this module will never have a stable release.

Why We Implemented It

By default, the Drupal Address module strictly requires a country to be selected. The chosen country dictates which address fields (like state, zip code, or province) are displayed and validated, based on that specific country's official address format.

However, there are real-world scenarios where an address needs to be recorded, but the country is either unknown, incomplete, or not applicable. In the default setup, leaving the country blank completely clears and hides the rest of the address fields. See #3522596: Allow country to be empty if unknown

We implemented this module to solve that exact problem. It overrides the default restrictive behavior by allowing to select no country for an address, still showing the address fields and providing a generic address format when no country is selected. This ensures that users can still input and display essential address information without needing to provide a country.
Furthermore, migrated data which is missing country codes but holds other address data won't get cleared automatically.

If a country is selected, the module uses the default Address implementation and logics.

Usage

To use this functionality, simply select the "Address (with empty / unknown country)" widget and formatter(s) on your address fields in your entity's form and display settings.

IMPORTANT: The formatters and widgets are required to be used together! Don't mix them with the default Address widgets / formatters, or you'll see errors or unexpected behaviour!

Also note that if this module is enabled, all address fields in the project are replaced by the custom implementation. See the module file for details.

Alternatives

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Mar 2026
Latest release
6 months ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Slowing

Releases

Version Type Core Release date
0.0.1-alpha1 Pre-release 11 Mar 12, 2026
0.x-dev Dev 11 Mar 12, 2026