Hi,
Is there any support for urlReplacing in Umbraco 9? If there is, how do you achieve this? In umbraco 7 you could in umbracoSettings.config specify characters in the url that would be replaced and by what:
I don't remember that I had to configure it in Umbraco 8. It's mainly to replace åäö with ao. Is there any way to do this in Umbraco 9?
Thanks for the reply. I've tried replacing the following some characters but it still isn't working:
Not sure if I need to configure anything else, add replacement for every character in the defaultcharcollection or if there's a bug. I'll try adding all the characters in the list, otherwise I'll report an issue in the repo.
urlReplacing for Umbraco 9
Hi, Is there any support for urlReplacing in Umbraco 9? If there is, how do you achieve this? In umbraco 7 you could in umbracoSettings.config specify characters in the url that would be replaced and by what:
I don't remember that I had to configure it in Umbraco 8. It's mainly to replace åäö with ao. Is there any way to do this in Umbraco 9?
Hi Björn
I haven't tried this myself yet, but looking at the
appsettings.template.json
here: https://github.com/umbraco/Umbraco-CMS/blob/v9/contrib/src/Umbraco.Web.UI/appsettings.template.json#L38-L40https://github.com/umbraco/Umbraco-CMS/blob/5bfab13dc5a268714aad2426a2b68ab5561a6407/src/Umbraco.Core/Configuration/Models/RequestHandlerSettings.cs#L93
It seems it has these replacements by default:
https://github.com/umbraco/Umbraco-CMS/blob/5bfab13dc5a268714aad2426a2b68ab5561a6407/src/Umbraco.Core/Configuration/Models/RequestHandlerSettings.cs#L20-L46
It read this collection here:
https://github.com/umbraco/Umbraco-CMS/blob/v9/contrib/src/Umbraco.Core/Strings/DefaultShortStringHelperConfig.cs#L63-L65
Thanks for the reply. I've tried replacing the following some characters but it still isn't working:
Not sure if I need to configure anything else, add replacement for every character in the defaultcharcollection or if there's a bug. I'll try adding all the characters in the list, otherwise I'll report an issue in the repo.
Did you manage to get this working? I'm experiencing the same issue. The URLs stay the same regardless of replacements in appsettings.
Sorry the late reply. I think it has been fixed through Bjarnes post on Github :) https://github.com/umbraco/Umbraco-CMS/issues/11381
I just tested this as well by updating the
appsettings.json
, which is also documented here: https://our.umbraco.com/documentation/Reference/V9-Config/RequestHandlerSettings/But after rebuild and restart of application plus a "Save & Publish" the char isn't replaced in URL.
"RequestHandler": { "ConvertUrlsToAscii": "try", "CharCollection": [ { "Char": "ø", "Replacement": "o" } ] }
Using VS or VS Code show intellisense for the options available.
I have reported the issue here: https://github.com/umbraco/Umbraco-CMS/issues/11381
is working on a reply...