Date | 2023-05-09 (556 days ago) |
---|---|
Downloads | 619 downloads |
NuGet | View on NuGet |
GitHub | View on GitHub |
Target Frameworks | .NET 6 |
Umbraco Versions | Umbraco 10 Umbraco 11 |
New release for Umbraco 10 and 11. This release will not work on older versions of Umbraco.
#installation
">Installation.NET CLI:
dotnet add package Skybrud.Umbraco.Redirects --version 4.0.9
Package Manager:
Install-Package Skybrud.Umbraco.Redirects -Version 4.0.9
#changelog
">ChangelogAdded support for culture variant redirects (see 861fa4a
and others)
When selecting a content node as the destination of a redirect, the UI will now show an option for selecting a specific culture if the content node varies by culture.
Added support for localized error messages from the API (see fd00efc
)
Some of the endpoints now return better and localized error messages should an error occur.
The various GetDestinationUrl
methods should not be nullable (see a300820
)
Ideally the saved destination URL of a redirect should never be null or empty, so if this is the case, it indicates a malformed redirect. If all redirects are created through the UI or the package's default implementation for IRedirectService
, this shouldn't happen, so it should be okay to throw an exception instead of returning "null".
Added extension methods for helping with redirecting the user when not using the build-in middleware (see 1ed1d1d
)
In some cases, it makes sense to bypass the RedirectsMiddleware
that ships with this package (eg. when using Blazor pages). The new extension methods help simplifying the logic for handling redirects in these situations.
Added support for disabling the dashboard through appsettings.json
(see a4b2e3c
)
As an alternative to controlling the dashboard from code, it can now be disabled from appsettings.json
as well.
Fixed issue with OutboundRedirectReferenceFactory
and legacy values (see 104de02
)
In the Umbraco 10+ package (v4), the outbound redirect property will save an empty value if a destination hasn't been selected, whereas the Umbraco 9 package (v3) will save a JSON object with an empty destination property, so if upgrading from Umbraco 9, the legacy values would cause issues since the OutboundRedirectReferenceFactory
for one didn't use the internally models factory, and second didn't do a proper null check. By properly utilizing the models factory and adding a null check, legacy values should no longer cause issues.