Issue with language select (thread culture does not update on redirect)
b

Bram

over 1 year ago
Hi everyone, I've implemented a language selector that i've copied from another project that we have running in v13. After selecting the correct languages and binding a domain to a culture I can switch to the new link. As far as I can remember, that should be enough to change the UI culture in Umbraco. I'm being redirected to the correct url but the thread culture does not change. Meaning that the "active" field will always be true for the default language (NL) even though the language should switch after switching to the new Url. This is because
Thread.CurrentThread.CurrentCulture.Name
will always be nl-NL Does anyone have a fix?
var languages = _localizationService.GetAllLanguages();

        var publishedLanguages = languages.Where(x => pageCultures.Contains(x.IsoCode, StringComparer.InvariantCultureIgnoreCase));
        foreach (var lang in publishedLanguages)
        {
            var lowercaseIsoCode = lang.IsoCode.ToLower(System.Globalization.CultureInfo.CurrentCulture);
            if (!website.IsPublished(lowercaseIsoCode))
            {
                continue;
            }

            var isHomepage = current is HomePage;
            var content = !isHomepage && current.IsPublished(lowercaseIsoCode) ? current : website;

            var name = string.Empty;
            if (lang.CultureInfo!.IsNeutralCulture)
            {
                name = lang.CultureInfo.NativeName;
            }
            else
            {
                name = lang.CultureInfo.Parent.NativeName;
            }

            yield return new LanguageUrl
            {
                Name = name,
                IsoName = lang.CultureInfo?.TwoLetterISOLanguageName,
                Alt = GetLanguageUrlAlt(lang.CultureInfo!.TwoLetterISOLanguageName),
                Url = content.Url(lang.IsoCode),
                Active = lang.CultureInfo.Name.Equals(Thread.CurrentThread.CurrentCulture.Name, StringComparison.Ordinal)
            };
        }
Link node selection does not auto genera...
a

Anders Bjerner

over 1 year ago
Anyone with examples or documentation on how to use the link picker modal in Umbraco 14? For one, the link picker modal is not part of
@umbraco-cms/backoffice/modal
like most other modals. I've found old'ish examples to indicate that it may have been (might have been the pre-reeleases), but its not in 14.1.0. I haven't found other references for it in the import map, so currently I'm importing this directly. Which feels a bit wrong - e.g. there is no cache busting in the URL.
js
import { UMB_LINK_PICKER_MODAL } from "/umbraco/backoffice/packages/multi-url-picker/link-picker-modal/link-picker-modal.token.js";
The modal also still feels a bit incomplete. The modal with is currently
small
, but I'd say it should be
medium
to give some more horizontal space. This is general for the modal, but especially around the URL and query string inputs being on the same line. Ideally the query string field should be shown below the URL field. When picking a content or media node, the title field isn't populated. But entering a value in the title field after having selected an node, the returned link object will only contain the
name
property, meaning the
type
,
unique
and
url
properties are lost. Similar if picking a node and then entering a value in the query string field, only the
queryString
property is returned. The
url
property will also just be the GUID key, and not an actual URL. In previous versions of Umbraco, the URL would be resolved before picking the node. https://github.com/umbraco/Umbraco-CMS/issues/16596 describes a part of this, but I haven't been able to find other issues about this. Someone from HQ that can shed a bit of light on the status of the link picker modal? Is it still being worked on, or should I create an issue to bring attention to the issue?
Umbraco Azure Hosting setup (Or cloud setup in general)
a

Aleksander Fjellvang

over 1 year ago
Hi. I would like to ask all the agencies out there: How do you host umbraco? Specifically if you have a cloud setup? At my agency we're currenly hosting all our solutions on a windows machine, for the most part utilizing SQL express for the database. We have one for dev, stage and 2 for production websites. When we're setting up websites we RDP into said machine and configure everything manually. I loathe this setup, i think it's arcane and cumbersome. Now luckly for me and my colleagues, we're forced to change hosting provider. Therefor i've been looking into Azure. I love working with it. IaC makes everything so much easier, and services like KeyVault blows our old setup of manually setting environment variables out of the water. Now i have to make the argument that this is the way to go. Sadly my team lead is very nervous with making the switch. He's afraid we will need a dedicated DevOps Team. That if anything goes wrong, we can't call a tech support etc. Basically he knows what he gets when he just RDPS into a windows machine. I think it's abit blown out of the water - I think we would have less issues with a cloud provider like azure and a easier time configuring it than we would with a IIS site on a remote machine. But then there's the question of costs. Azure pricing is not very transparent. With our old solution we had one price, which is much easier to forecast rather than x USD per cpu hour. How do you keep costs down? I would imagine for ie a DEV environment that you have one shared AppServicePlan, with X amount of AppServices. But then how about SQL server? The license is quite expensive, do you use a shared license or did you look into alternatives? for this setup i asume pretty basic CRUD umbraco sites, so propbably not alot of fancy Services Thanks a bunch! TLDR: Do you have tips on how to determine pricing and setup for x amount of umbraco solutions in the cloud