Skip to content

[DEFECT] New Edit Content: locale version creation crashes with 500 when using a language-only locale (no country) #36106

Description

@adrianjm-dotCMS

Problem Statement

In the new Edit Content experience, attempting to create a new content version for a language-only locale (one configured with just a language, no country code) results in a 500 Internal Server Error from the backend. The UI surfaces this as a generic "Unknown Error", giving the user no actionable information.

The failure is confirmed in the network layer: POST /api/v1/content/versions/{id} returns:

{"message":"null value in entry: country=null"}

This indicates the backend builds a key/entry using both language and country, but does not handle the case where country is null — a valid state since dotCMS allows locales to be defined with language alone.

Impact: Any content type with the new Edit Content enabled that has a language-only locale is affected. Users cannot create locale versions for those languages until the bug is fixed.

Screen.Recording.2026-06-10.at.3.10.09.PM.mov

Steps to Reproduce

  1. Ensure a language-only locale exists (e.g., es — Spanish, no country).
  2. Navigate to any content type with the new Edit Content experience enabled.
  3. Open a content item.
  4. In the locale/language selector, attempt to add a new content in the language-only locale.
  5. Observe the result.

Expected: The new locale version is created successfully (same as when using a locale with both language and country, e.g., es_MX).

Actual: The UI shows "Unknown Error" and the API returns HTTP 500 with {"message":"null value in entry: country=null"}.


Acceptance Criteria

  • Creating a locale version with a language-only locale (no country code) in the new Edit Content experience succeeds without errors.
  • POST /api/v1/content/versions?identifier={id} handles a null country value gracefully — no 500 is thrown.
  • The UI does not show "Unknown Error" for language-only locales.
  • Creating locale versions with locales that include both language and country continues to work (no regression).

dotCMS Version

Latest from main branch.


Severity

Medium - Some functionality impacted


Links

NA

Metadata

Metadata

Assignees

No one assigned

    Type

    Fields

    No fields configured for Bug.

    Projects

    Status
    QA

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions