"Unrecognized Guid format" error when Media.AlwaysAppendRevision is set to true

  • Adding a new language to an existing media item from the Media Library might fail with an exception if the AlwaysAppendRevision setting in Sitecore.config file is set to "true". The following message can be found in the log:

    [FormatException: Unrecognized Guid format.]
       System.GuidResult.SetFailure(ParseFailureKind failure, String failureMessageID, Object failureMessageFormatArgument, String failureArgumentName, Exception innerException) +4139152
       System.Guid.TryParseGuid(String g, GuidStyles flags, GuidResult& result) +534
       System.Guid.Parse(String input) +103
       Sitecore.Resources.Media.MediaProvider.GetMediaUrl(MediaItem item, MediaUrlOptions options) +728
       ...
       Sitecore.XA.Foundation.Theming.Bundler.AssetLinksGenerator.AddThemeInclude(ThemeInclude themeInclude, AssetLinks result, IThemesProvider themesProvider) +320
       Sitecore.XA.Foundation.Theming.Bundler.AssetLinksGenerator.GenerateAssetLinks(IThemesProvider themesProvider) +779
       ASP._Page_Views_SxaLayout_SxaLayout_cshtml.Execute() in c:\inetpub\wwwroot\wkcareers.sc\Views\SxaLayout\SxaLayout.cshtml:11
      ...
  • To resolve the issue, consider one of the following options:

Applies to:

CMS 8.2 Update-5 - 9.2 Initial Release

CMS 9.3 Initial Release

February 26, 2020
February 26, 2020

Reference number:

219261