Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ian Mone 8 posts 88 karma points
    Jan 26, 2018 @ 18:45
    Ian Mone
    0

    String to date conversion error.

    Hello:

    I've been getting a string to date conversion error randomly on some tasks, most recently on trying to empty my trash.

    I understand what the error is, but have NO idea where to begin to look to fix it. Has anyone encountered something similar?

    Error/Stack Trace:

    Received an error from the server

    An error occured Value "Monday, January 27, 2015" of type "System.String" could not be converted to type "System.DateTime" which is expected by property type "date". Exception Details System.InvalidOperationException: Value "Monday, January 27, 2015" of type "System.String" could not be converted to type "System.DateTime" which is expected by property type "date". Stacktrace at Umbraco.Core.Models.Property.ThrowTypeException(Object value, Type expected, String alias) at Umbraco.Core.Models.Property.setValue(Object value) at Umbraco.Core.Persistence.Factories.PropertyFactory.BuildEntity(PropertyDataDto[] dtos) at Umbraco.Core.Persistence.Repositories.VersionableRepositoryBase2.GetPropertyCollection(Sql docSql, IEnumerable1 documentDefs) at Umbraco.Core.Persistence.Repositories.ContentRepository.ProcessQuery(Sql sql) at Umbraco.Core.Persistence.Repositories.ContentRepository.PerformGetByQuery(IQuery1 query) at Umbraco.Core.Persistence.Repositories.RepositoryBase2.GetByQuery(IQuery1 query) at Umbraco.Core.Persistence.Repositories.RecycleBinRepository2.GetEntitiesInRecycleBin() at Umbraco.Core.Services.ContentService.EmptyRecycleBin() at Umbraco.Web.Editors.ContentController.EmptyRecycleBin() at lambdamethod(Closure , Object , Object[] ) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>cDisplayClass10.9(Object instance, Object[] methodParameters) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Controllers.ApiControllerActionInvoker.

  • Alex Skrypnyk 6175 posts 24186 karma points MVP 8x admin c-trib
    Jan 30, 2018 @ 13:15
    Alex Skrypnyk
    0

    Hi Ian

    Can you show the code that causes the issue? It's easy to fix this transformation but we have to see the code first :)

    Alex

  • Ian Mone 8 posts 88 karma points
    Jan 30, 2018 @ 13:46
    Ian Mone
    0

    Hi Alex,

    Thanks for the reply.

    I get the error when I try to empty my recycle bin or when I try to load my website for only the first time after a "rebuild".

    It's not specifically throwing the error on a certain code block. That's why I don't know how to start looking for the error.

Please Sign in or register to post replies

Write your reply to:

Draft