Digbyswift.Umbraco.OrphanedLinks 1.1.1

Prefix Reserved
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Digbyswift.Umbraco.OrphanedLinks --version 1.1.1
                    
NuGet\Install-Package Digbyswift.Umbraco.OrphanedLinks -Version 1.1.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Digbyswift.Umbraco.OrphanedLinks" Version="1.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Digbyswift.Umbraco.OrphanedLinks" Version="1.1.1" />
                    
Directory.Packages.props
<PackageReference Include="Digbyswift.Umbraco.OrphanedLinks" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Digbyswift.Umbraco.OrphanedLinks --version 1.1.1
                    
#r "nuget: Digbyswift.Umbraco.OrphanedLinks, 1.1.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Digbyswift.Umbraco.OrphanedLinks@1.1.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Digbyswift.Umbraco.OrphanedLinks&version=1.1.1
                    
Install as a Cake Addin
#tool nuget:?package=Digbyswift.Umbraco.OrphanedLinks&version=1.1.1
                    
Install as a Cake Tool

NuGet version (Digbyswift.Umbraco.OrphanedLinks) Build Status

Prevents broken links in Umbraco CMS rich text editors when linked content is unpublished.

Why?

Links to Umbraco based content in a rich text editor (RTE) are saved in a format using the content's unique key, e.g. <a href="/{localLink:umb://document/13ce96ec83fe47fbb82e5dcca071cf2d}">. This allows the CMS to maintain references to the linked content regardless of where it is moved to.

However, if a linked page is unpublished in the Umbraco CMS, the link in the RTE is not preserved by Umbraco. In a standard install, in the published RTE content you will see the link becoming a href="#".

This package will persist the URLs so that links are preserved. This has the following benefits:

  • Redirects can be implemented when the link is broken but not when the link is a #.
  • Broken links are easier to find, either by search engines or by automated scraping tools;

How?

It does this by saving content URLs to a database table upon the following Umbraco events:

  • ContentUnpublishingNotification and
  • ContentMovingToRecycleBinNotification

It will remove URLs from the DB upon ContentPublishingNotification

In-memory cache is used courtesy of LazyCache and is updated upon ContentCacheRefresherNotification and so will work in a both a single instance and a load-balanced setup.

Setup

Include the AddOrphanedLinks() extension method in the startup of the project:

var umbracoBuilder = builder
    .CreateUmbracoBuilder()
    .AddBackOffice()
    .AddWebsite()
    .AddComposers()
    .AddOrphanedLinks()

Config

By default the package is enabled and assumes the following optional configuration:

{
  "Digbyswift": {
    "OrphanedLinks": {
      "Enabled": true,
      "Content": {
        "Enabled": true,
        "IncludedDocTypes": [],
        "ExcludedDocTypes": []
      },
      "Media": {
        "Enabled": true,
        "IncludedMediaTypes": [],
        "ExcludedMediaTypes": []
      }
    }
  }
}

Included/excluded types

The following rules apply:

  • Setting one or more included types for media or content will result in any excluded types being ignored.
  • Setting [] for included types (or not providing this setting) is the equivalent of including all types.
  • Setting [] for excluded types (or not providing this setting) is the equivalent of excluding all types.
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.2-preview0 120 7/14/2025
1.1.1 202 4/22/2025
1.1.0 163 4/22/2025
1.0.1 207 4/14/2025
1.0.0 189 4/14/2025
1.0.0-beta6 180 4/14/2025
1.0.0-beta5 156 4/9/2025
1.0.0-beta4 155 4/9/2025
1.0.0-beta3 156 4/9/2025
1.0.0-beta2 157 4/9/2025
1.0.0-beta1 157 4/9/2025