Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Elgars 5 posts 75 karma points
    Nov 24, 2021 @ 11:26
    Elgars
    0

    Different output result from 9.0 to 9.1 when using .Url(culture)

    Hi,

    After upgrade I've noticed different results when using .Url(culture) on IPublishedContent.

    State: I have a Umbraco site, which has a single language en-US, site node, doesn't have any hostnames set to it. None of my content currently varies by culture.

    When I fetch a published node and want to retrieve its URL for specific culture (UmbracoContext.Domains.DefaultCulture):

    In Umbraco 9.0 - I would get the actual URL node, the same result as just .Url() without culture.

    In Umbraco 9.1 - .Url() returns the expected result same as 9.0, but when specifying culture as the parameter, the result is #.

    Can somebody please explain what has changed?

    Thanks in advance

  • Elgars 5 posts 75 karma points
    Nov 24, 2021 @ 11:55
    Elgars
    0

    Allright, after some investigation, it looks like 9.1 is sensitive to casing of culture name, 9.0 didn't care much if it was en-us or en-US, but 9.1 does care, it must be en-US when using .Url(culture).

  • Zac 223 posts 575 karma points
    Feb 13, 2022 @ 12:02
    Zac
    0

    Looks like the fix is coming in 9.4: https://github.com/umbraco/Umbraco-CMS/pull/11886

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies