2

We are getting below error when publishing content for the first time to web database after Sitecore upgrade. The publishing method is publish site -> republish /smart publish.

Job started: Publish to 'web'|#Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: The supplied DateTime represents an invalid time. For example, when the clock is adjusted forward, any time in the period that is skipped is invalid. Parameter name: dateTime at System.TimeZoneInfo.ConvertTime(DateTime dateTime, TimeZoneInfo sourceTimeZone, TimeZoneInfo destinationTimeZone, TimeZoneInfoOptions flags, CachedData cachedData) at Sitecore.DateUtil.ToUniversalTime(DateTime serverTime) at Sitecore.Data.Items.ItemPublishing.GetDate(ID fieldId, DateTime defaultValue) at Sitecore.Data.Items.ItemPublishing.get_ValidFrom() at Sitecore.Data.Items.ItemPublishing.InValidRange(DateTime date) at Sitecore.Data.Items.ItemPublishing.IsValid(DateTime date, Boolean requireApproved, Database targetDatabase) at Sitecore.Data.Items.ItemPublishing.GetValidVersion(DateTime date, Boolean requireApproved, Boolean allowEmpty, Database targetDatabase) at Sitecore.Data.Items.ItemPublishing.GetValidVersion(DateTime date, Boolean requireApproved, Database targetDatabase) at Sitecore.Publishing.Pipelines.PublishItem.DetermineAction.Process(PublishItemContext context) at (Object , Object[] ) at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain) at Sitecore.Publishing.Pipelines.PublishItem.PublishItemPipeline.Run(PublishItemContext context) at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.ProcessPublishingCandidate(PublishingCandidate entry, PublishContext context, List1& referrers, List1& children) at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.ProcessPublishingCandidate(PublishingCandidate entry, PublishContext context) at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.ProcessEntries(IEnumerable1 entries, PublishContext context) at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.ProcessPublishingCandidate(PublishingCandidate entry, PublishContext context) at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.ProcessEntries(IEnumerable1 entries, PublishContext context) at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.ProcessPublishingCandidate(PublishingCandidate entry, PublishContext context) at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.ProcessEntries(IEnumerable1 entries, PublishContext context) at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.ProcessPublishingCandidate(PublishingCandidate entry, PublishContext context) at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.ProcessEntries(IEnumerable1 entries, PublishContext context) at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.ProcessPublishingCandidate(PublishingCandidate entry, PublishContext context) at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.ProcessEntries(IEnumerable1 entries, PublishContext context) at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.ProcessPublishingCandidate(PublishingCandidate entry, PublishContext context) at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.ProcessEntries(IEnumerable1 entries, PublishContext context) at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.ProcessPublishingCandidate(PublishingCandidate entry, PublishContext context) at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.ProcessEntries(IEnumerable1 entries, PublishContext context) at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.ProcessPublishingCandidate(PublishingCandidate entry, PublishContext context) at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.ProcessEntries(IEnumerable1 entries, PublishContext context) at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.Process(PublishContext context) at (Object , Object[] ) at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain) at Sitecore.Publishing.Pipelines.Publish.PublishPipeline.Run(PublishContext context) at Sitecore.Publishing.Publisher.PublishWithResult() --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Sitecore.Reflection.ReflectionUtil.InvokeMethod(MethodInfo method, Object[] parameters, Object obj) at Sitecore.Jobs.JobRunner.RunMethod(JobArgs args) at (Object , Object[] ) at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain) at Sitecore.Jobs.Job.ThreadEntry(Object state)

Has anyone come across this error? Please advice.

  • Does the time of the server correct? Can you check if the item date statistics are in the future and also the server time if it is corresponding to the Sitecore instance – Hishaam Namooya Jun 20 '17 at 20:16
  • @HishaamNamooya - all sitecore components including database, solr service are on the same machine. – vijay majeti Jun 20 '17 at 20:19
  • are they in Cloud ? i.e. would have been deployed into new timezone. Also need to understand when was your last successful publish datetime. GMT +/- ? – Balaji Kuppuswamy Jun 20 '17 at 20:22
  • Can you check from the ShowConfig.aspx page if you have specified a timezone. The setting name is ServerTimeZone – Hishaam Namooya Jun 20 '17 at 20:24
  • 2
    Database backup was taken from UTC timed server and restored onto local machine with EST timezone. So, setting ServerTimeZone to "UTC" allowed the publishing to finish successfully. – vijay majeti Jun 27 '17 at 14:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.