General link field error


Description

When rebuilding the link database or rendering an item with a "general link" field, the following error can occur:

System.FormatException: Unrecognized Guid format. Actual value:  ---> System.FormatException: Unrecognized Guid format.
   at System.Guid.GuidResult.SetFailure(ParseFailureKind failure, String failureMessageID, Object failureMessageFormatArgument, String failureArgumentName, Exception innerException)
   at System.Guid.TryParseGuid(String g, GuidStyles flags, GuidResult& result)
   at System.Guid..ctor(String g)
   at Sitecore.Data.ID..ctor(String id)

The error appears if some "general link" field (or deprecated "link" field) contains an empty "ID" attribute in its raw value, or doesn't contain it at all.

Solution

Install a hotfix corresponding to your Sitecore Experience Platform version:

See the readme.txt file inside the archive for installation instructions.

Note: These packages are specific to Sitecore XP versions.

After applying the hotfix, you must not install any Sitecore XP updates until Sitecore includes the changes associated with the hotfix in a public update.

You can find more details about hotfixes here: KB0077333

In case the hotfix can't be installed for some reason there is another solution:

  1. Download the Sitecore.Support.203014-8.2.6.0.zip archive.
  2. To install and run the patch please follow the instructions inside the readme file.
Note:

Unlike the hotfixes mentioned above, FixLinks.aspx from Sitecore.Support.203014.zip fixes the existing corrupted links in master database.

In order to fix the issue for web database, please republish site after FixLinks.aspx finishes its work.

If new problematic links appear, the page should be launched again.