Skip to content

getItems() does not resolve language fallback when querying by key #443

Description

@rawnanoob

Description

When querying content by key using getItems(), the lookup appears to require an exact language match.

If content does not exist in the requested locale but a language fallback is configured in CMS, getItems() returns no items.

await client.getItems({
  key,
  locale: "en-PH",
});

Expected behavior

getItems() should resolve configured language fallbacks when looking up content by key.

If no content exists for the requested locale, but a fallback language is configured, the fallback content should be returned instead of an empty result.

Actual behavior

getItems() returns no items when the requested locale does not have its own language version, even though a fallback language is configured.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions