I've got this weird issue with Sitecore 9.2. I'm building a multi-lingual site and require the language code to always appear in URLs. I've configured this on the link provider as follows:
<add name="custom" type="custom.Feature.ItemResolver.LinksProvider.CustomLinksProvider, custom.Feature.ItemResolver" addAspxExtension="false" alwaysIncludeServerUrl="false" encodeNames="true" languageEmbedding="asNeeded" languageLocation="filePath" lowercaseUrls="true" shortenUrls="true" useDisplayName="false" domainlowercaseUrlsPath="true" patch:before="add[@type='Sitecore.Links.LinkProvider, Sitecore.Kernel']" />
With languageEmbedding set to "always", The experience editor fails for all languages other than Global English (the default language for the site). It seems the site resolving does not work, as it appends sc_site=website on the end of the EE URL, which causes it to fail. If I change website to the correct site name, it works.
All the correct components are on the page, and they have datasources defined, however they don't seem to render anything.
With languageEmbedding set to "asNeeded", Experience Editor works fine, however the link provider is not adding the language code to the URL.
Smells like a Sitecore bug to me.. anyone else experienced this, or found a workaround? I'll be raising a support request with Sitecore about this soon, but figured I'd try here first and save myself some time and frustration.
Thanks heaps :)