Try our conversational search powered by Generative AI!

Link Validation - "This operation is not supported for a relative URI"

Vote:
 

I have a EPiServer CMS 7.13 web site and is trying to run the Link Validation scheduled job.

However, the job always fails and returns the error "This operation is not supported for a relative URI.".

I have not done any configuration at all and the Link Validation is completely default.

Thanks for helping.

#116569
Feb 02, 2015 11:56
Vote:
 

I have the same issue.

CMS 7.18

Error log:

2015-02-05 14:24:17,517 [357] ERROR EPiServer.DataAbstraction.ScheduledJob: Job EPiServer.LinkAnalyzer.LinkValidationJob failed
System.InvalidOperationException: This operation is not supported for a relative URI.
at System.Uri.get_Scheme()
at EPiServer.LinkAnalyzer.LinkValidator.ValidateHttpLink(Uri url)
at EPiServer.LinkAnalyzer.LinkValidationRunner.ValidateLink(Uri url)
at EPiServer.LinkAnalyzer.LinkValidationRunner.CheckAndUpdateStatus(SoftLink link)
at EPiServer.LinkAnalyzer.LinkValidationRunner.CheckAndUpdateStatus(IEnumerable`1 softLinks)
at EPiServer.LinkAnalyzer.LinkValidationRunner.ValidateLinks()
at EPiServer.DataAbstraction.ScheduledJob.<>c__DisplayClass9.<InternalExec>b__5()
System.InvalidOperationException: This operation is not supported for a relative URI.
at System.Uri.get_Scheme()
at EPiServer.LinkAnalyzer.LinkValidator.ValidateHttpLink(Uri url)
at EPiServer.LinkAnalyzer.LinkValidationRunner.ValidateLink(Uri url)
at EPiServer.LinkAnalyzer.LinkValidationRunner.CheckAndUpdateStatus(SoftLink link)
at EPiServer.LinkAnalyzer.LinkValidationRunner.CheckAndUpdateStatus(IEnumerable`1 softLinks)
at EPiServer.LinkAnalyzer.LinkValidationRunner.ValidateLinks()
at EPiServer.DataAbstraction.ScheduledJob.<>c__DisplayClass9.<InternalExec>b__5()

#116834
Feb 05, 2015 15:14
Vote:
 

Have you been able to pinpoint it to some setting or configuration?

#116835
Feb 05, 2015 15:29
Vote:
 

Hi, 

Have seen this issue earlier and problem was related to  link to www.site.com - this entry did not have an http:// header. It could also happen when a url has an invalid character or even  due to a relative URI -entries in tblContentSoftlink.


What you can do is to run sql query below and see if it returns any hit. If yes, correct those links and re-run the job. You should be fine hopefully. 


SELECT        *FROM           tblContentSoftlinkWHERE        (LinkURL NOT LIKE '%~/link%') AND (LinkURL NOT LIKE '%http%') AND (LinkURL NOT LIKE '%https%') AND (LinkURL NOT LIKE '%mailto%')

/Shahid

#116838
Feb 05, 2015 15:51
Vote:
 

The SQL query returned about 600 links, most of them was JavaScript methods and a few was relative links to Global Assets folder.

These links are not to be considered broken as they are working.

I have been in contact with the EPiServer Developer Support and they suggested the same query and adding a few exclusions to the LinkValidator configuration.

Our configuration is as follows:

	<linkValidator 
      externalLinkErrorThreshold="10" 
      maximumRunTime="4:00:00" 
      recheckInterval="30.00:00:00" 
      userAgent="EPiServer LinkValidator" 
      proxyAddress="" 
      proxyUser="" 
      proxyPassword="" 
      proxyDomain=""
      internalLinkValidation="Api">
<excludePatterns>
      <add regex="^\."/>
      <add regex="^\/"/>
      <add regex="^cel" />
      <add regex="^Documents" />
      <add regex="^file" />
      <add regex="^javascript" />
      <add regex="^outbind" />
    </excludePatterns>
</linkValidator>

However, the error message still persists.

#117091
Feb 11, 2015 13:39
Vote:
 

Hi,

Did you solve this issue?

I have the same error on our site.

// Andreas

#118846
Mar 16, 2015 14:28
Vote:
 

Like Shahid:

Run this query:

SELECT *

FROM tblContentSoftlink

WHERE (LinkURL NOT LIKE '%~/link%') AND (LinkURL NOT LIKE '%http%') AND (LinkURL NOT LIKE '%https%') AND (LinkURL NOT LIKE '%mailto%')

Every hit contains a broken link. Go to the page and correct the link.

Worked for me.

#118847
Mar 16, 2015 14:35
Vote:
 

Thanks!

I tried it, I got a lot of tel:-links (tel:08010101). Can that be a problem for the link validator?

#118868
Mar 16, 2015 16:35
Vote:
 

I added this in my episerver.config-file. Now the job is running.

<linkValidator>
	<excludePatterns>
		<add regex="^\."/>
		<add regex="^\/"/>
		<add regex="^cel" />
		<add regex="^Documents" />
		<add regex="^file" />
		<add regex="^javascript" />
		<add regex="^outbind" />
		<add regex="^tel" />
	</excludePatterns>
</linkValidator>
#118874
Mar 16, 2015 17:03
Vote:
 

You may have to change the exclusion list depending on your links. I added ^globalassets and removed ^Documents on my sites to get it to work.

#122624
Jun 08, 2015 13:20
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.