Hi,
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) *
FROM [dbo].[tblContentSoftlink]
where LinkUrl like '/%'
Hi,
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:
PKID | FKOWNERCONTENTID | FKREFERENCEDCONTENTGUID | OWNERLANGUAGEID | REFERENCEDLANGUAGEID | LINKURL | LINKTYPE |
67007 | 11789 | 00000000-0000-0000-0000-000000000000 | 1 | /EPiServer/CMS/Content/globalassets/ireland/images/icons/icons_orange-144px-03.png,,27966?epieditmode=False | 5 | |
68078 | 18999 | 00000000-0000-0000-0000-000000000000 | 1 | /ireland/careers/get-started/ | 2 | |
89219 | 24608 | 1edfa0cc-6d56-47d6-ba16-795eeeccead5 | 1 | /link/1edfa0cc6d5647d6ba16795eeeccead5.aspx | 1 | |
89626 | 25064 | 164b13ee-a654-41a7-b611-2fa76109d956 | 1 | /link/164b13eea65441a7b6112fa76109d956.aspx | 1 | |
113142 | 28618 | 86435986-5270-4bb4-9e6a-40e3ff587c09 | 1 | /link/8643598652704bb49e6a40e3ff587c09.aspx | 1 |
Hi Deepa,
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) *
FROM [dbo].[tblContentSoftlink]
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:
/EPiServer/CMS/?language=en#context=epi.cms.contentdata:///18999
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.
Hello Paul,
Thank you so much with help regarding relative URI issue for link validation. Now we are facing issue with mailto: link with one of the page. Can you please help us tracing the particular page with mailto: link which is not correctly used or is this is issue with all of the pages with mailto: link?
Link validation fails with this error "The scheme for the url "mailto:hello@wearev1.com?subject=Purchasing Management" in not http or https."
Hi Deepa,
You can get the record in question by running a SQL command like the following:
SELECT *
FROM [dbo].[tblContentSoftlink]
WHERE LinkUrl = 'mailto:hello@wearev1.com?subject=Purchasing Management'
It looks like the issue is with the LinkProtocol field in the database. For a mailto link this should have the value 'mailto' but, if I use that mailto link, the LinkProtocol is 'NULL'. This appears to be due to the space in the subject. Removing the space seems to resolve the issue for me though that may not be practical in your situation.
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".
Link Validation
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.
DateDurationStatusServerMessage
Can you please help with this behaviour of Link validation tool? What is the possible fix for this issue?