Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Breaking change]: URL Replacing when you're not using automatic redirect tracking #4

Open
nul800sebastiaan opened this issue Sep 8, 2022 · 0 comments

Comments

@nul800sebastiaan
Copy link
Member

nul800sebastiaan commented Sep 8, 2022

Description

In PR umbraco/Umbraco-CMS#12850 we made the behavior of URL replacement characters more consistent. In some cases this will change URLs when publishing a node. For most people this won't be a problem, automated URL tracking (either the built-in Umbraco one or additional packages) will redirect the old URL to the new URL.

However, for some people, the following can happen:

  • If you are using the default URL replacement characters (you didn't put any CharCollection in appSettings.config yourself)
  • And if you have disabled URL tracking and have no other URL tracking package / custom code
    Only nodes with lower case å, æ, ø, ä, ö, or ü in it would receive URL replacement characters.
  • The existing URL will change, with no redirects to the new URL so any hardcoded URLs linking to those pages will now encounter a 404 error

Version

Umbraco 11

Previous behavior

Only for nodes with lower case å, æ, ø, ä, ö, or ü these characters would be replaced in the URL.

New behavior

Nodes with upper case upper case Å, Æ, Ø, Ä, Ö, or Ü will now also see these characters replaced in the URL.

Type of breaking change

This is a behavioral change.

Reason for change

The reason for the change was to make the replacement consistent for both the upper and lower case versions of those characters.

Recommended action

To revert to the previous behavior, you can configure that in your appSettings.config file as follows:

"Umbraco": {
  "CMS": {
    "RequestHandler": {
      "AddTrailingSlash": true,
      "ConvertUrlsToAscii": "try",
      "CharCollection": [
      {
        "Char": " ",
        "Replacement": "-"
      },
      {
        "Char": "\\",
        "Replacement": ""
      },
      {
        "Char": "'",
        "Replacement": ""
      },
      {
        "Char": "%",
        "Replacement": ""
      },
      {
        "Char": ".",
        "Replacement": ""
      },
      {
        "Char": ";",
        "Replacement": ""
      },
      {
        "Char": "/",
        "Replacement": ""
      },
      {
        "Char": "\\\\",
        "Replacement": ""
      },
      {
        "Char": ":",
        "Replacement": ""
      },
      {
        "Char": "#",
        "Replacement": ""
      },
      {
        "Char": "+",
        "Replacement": "plus"
      },
      {
        "Char": "*",
        "Replacement": "star"
      },
      {
        "Char": "&",
        "Replacement": ""
      },
      {
        "Char": "?",
        "Replacement": ""
      },
      {
        "Char": "æ",
        "Replacement": "ae"
      },
      {
        "Char": "ä",
        "Replacement": "ae"
      },
      {
        "Char": "ø",
        "Replacement": "oe"
      },
      {
        "Char": "ö",
        "Replacement": "oe"
      },
      {
        "Char": "å",
        "Replacement": "aa"
      },
      {
        "Char": "ü",
        "Replacement": "ue"
      },
      {
        "Char": "ß",
        "Replacement": "ss"
      },
      {
        "Char": "|",
        "Replacement": "-"
      },
      {
        "Char": "<",
        "Replacement": ""
      },
      {
        "Char": ">",
        "Replacement": ""
      }
      ]
    }
  }
}

Affected APIs

n/a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant