Skip to main content
removing Sitecore Version tags
Link
Pete Navarra
  • 14.7k
  • 3
  • 45
  • 89
Source Link
Dmitry Harnitski
  • 1.8k
  • 1
  • 11
  • 23

"String was not recognized as a valid DateTime" error

Images do not appear in Select Media dialog when I click Browse button in Image field.

HTTP response from ItemWeb API that expected to return Images contains this error:

String was not recognized as a valid DateTime.

There is an associated entry in Log:

2724 10:59:23 ERROR [Item Web API] String was not recognized as a valid DateTime.
Exception: System.FormatException
Message: String was not recognized as a valid DateTime.
Source: mscorlib
   at System.DateTimeParse.ParseExact(String s, String format, DateTimeFormatInfo dtfi, DateTimeStyles style)
   at Sitecore.ItemWebApi.Facets.UpdatedFacetProvider.GetFacetValue(String value)
   at Sitecore.ItemWebApi.Pipelines.Request.Search.GetFacets(IList`1 facetProviders, FacetResults facets)
   at Sitecore.ItemWebApi.Pipelines.Request.Search.RunSearchPipeline(RequestArgs args, String searchText, String languageName, Boolean showHiddenItems)
   at Sitecore.ItemWebApi.Pipelines.Request.Search.Process(RequestArgs args)
   at (Object , Object[] )
   at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
   at Sitecore.ItemWebApi.Pipelines.HttpRequest.LaunchRequest.Process(HttpRequestArgs arguments)

We have Sitecore instances with the same site in different environments and issue is not reproducible there. One difference between this instance and others is lots of Media Items imported from Sitecore 6.5.

Any ideas how to fix this issue?