Skip to content

Content Delivery API returns incorrect route for unpublished variant document in preview mode #20366

@nhudinh0309

Description

@nhudinh0309

Which Umbraco version are you using?

16.4.0

Bug summary

When creating a variant content item with two cultures (en-US and da), publishing only the en-US culture while keeping da culture saved but unpublished, the Content Delivery API (called with preview mode) returns an incorrect route value for the da variant.

Image Image

Specifics

No response

Steps to reproduce

  1. Create a variant content item with two cultures: English (en-US) and Danish (da).
  2. Publish the en-US culture.
  3. Save the da culture without publishing.
  4. Call the Content Delivery API with the preview header enabled and Accept-Language is da
  5. Check the route value in the API response for the da culture.

Expected result / actual result

Expected result
The API should return the correct route value for the da culture (same as path value in da cultures)

Actual result
The API returns an incorrect route value for the da culture

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions