Link validation works as expected in local and integration environment and reports broken links in link status report. But if we run this in pre-production and production environment link validation tool fails and errors out as "This operation is not supported for a relative uri".
Specify whether the link validation function is active/inactive and how often the job should be run. The link validation job validates the status of all links in the website content.
Can you please help with this behaviour of Link validation tool? What is the possible fix for this issue?
From what I can see, this occurs if you include a relative URL (e.g. a URL starting with a /) in the content of one of your pages. To resolve the issue I think you'd need to fix that URL so that it points to a page in Episerver. If you need to find out where that URL is, you can run a query against the SoftLink table in the Episerver database as follows:
SELECT TOP (1000) *
where LinkUrl like '/%'
Thank you for query which helped us to get the list of relative uri from our live database. Can you please guide us on how can we correct the relative links for some content items?
please find few relative uri from database:
I suspect the issue will be with the external links which have a link type of 2 so the original query could be updated like this:
SELECT TOP (1000) *
where LinkUrl like '/%' and LinkType = 2
In your example above, this would leave the /ireland/careers/get-started/ URL as the problem URL. Assuming there's not too many records with a link type of 2, the easiest method would be to modify the content manually to fix the issue. The fkOwnerContentID field gives the ID of the page so, assuming your CMS is in the default location, you can jump directly to that page in the CMS editor by going to:
where 18999 is the ID of the content item you need to edit. You can then find the link in question and update it to be a reference to a page.