Drupal is a registered trademark of Dries Buytaert
Search API Solr 4.4.0 Minor update available for module search_api_solr (4.4.0). Page Manager 8.x-4.0 Major update available for module page_manager (8.x-4.0). Trash 3.1.0-beta2 New beta version released for module trash (3.1.0-beta2). Commerce AutoSKU 3.0.1 Minor update available for module commerce_autosku (3.0.1). Custom Field 4.0.10 Minor update available for module custom_field (4.0.10). Alternative login ID & display names 2.0.12 Minor update available for module alt_login (2.0.12). EntityReference UUID 3.0.1 Minor update available for module entity_reference_uuid (3.0.1). LocalGov Publications Importer 1.1.1 Minor update available for module localgov_publications_importer (1.1.1). Configuration Override Warn 8.x-1.6 Module config_override_warn updated after 10 months of inactivity (8.x-1.6). Table Alternate Rows Module table_altrow crossed 1,000 active installs.

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

Activity

Total releases
2
First release
Mar 2026
Latest release
4 months ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Active

Releases

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