NullReferenceException in Link Analyzer Job if invalid URL encountered

Found in

EPiServer.CMS.Core 11.1.0

Fixed in

EPiServer.CMS.Core 11.8.1

Created

Mar 06, 2018

Updated

Jun 27, 2018

Area

CMS Core

State

Closed, Fixed and tested


Description

Steps to reproduce

  1. Open TinyMCE.
  2. Link to "External link" and enter "/test.pdf" or any relative URL.
  3. Publish.
  4. Run the Link Validation job.

Expected:
Checks all links.

Actual: Reports "Object reference not set to an instance of an object."

2018-02-14 06:02:29,618 [50] ERROR EPiServer.DataAbstraction.ScheduledJob: Job EPiServer.LinkAnalyzer.LinkValidationJob failed for the job 'clientsite' with jobId ='6bce1827-f306-476a-b766-2b35838f6ea0' 
System.NullReferenceException: Object reference not set to an instance of an object. 
at EPiServer.LinkAnalyzer.Internal.LinkValidator.CreateAbsoluteUri(Url url) 
at EPiServer.LinkAnalyzer.Internal.LinkValidator.ValidateHttpLink(Uri url) 
at EPiServer.LinkAnalyzer.Internal.LinkValidationRunner.ValidateLink(Uri url) 
at EPiServer.LinkAnalyzer.Internal.LinkValidationRunner.CheckAndUpdateStatus(SoftLink link) 
at EPiServer.LinkAnalyzer.Internal.LinkValidationRunner.CheckAndUpdateStatus(IEnumerable`1 softLinks) 
at EPiServer.LinkAnalyzer.Internal.LinkValidationRunner.ValidateLinks() 
at EPiServer.Scheduler.Internal.DefaultScheduledJobExecutor.<Execute>d__31.MoveNext() 
System.NullReferenceException: Object reference not set to an instance of an object.