Copied to clipboard

Flag this post as spam?

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


  • Pratik Ramani 9 posts 99 karma points
    May 19, 2023 @ 14:29
    Pratik Ramani
    0

    Umbraco 8 Failed to retrieve data for content id 1057

    We have recently migrated from umbraco 7 to 8 and fixed all issues. Now while we publish any controller it says parent is still not published and gives below error :

    {"errorMsg":"Failed to retrieve data for content id 1057","data":{"Message":"An error has occurred.","ExceptionMessage":"Error converting value 593 to type 'System.String[]'. Path '', line 1, position 3.","ExceptionType":"Newtonsoft.Json.JsonSerializationException","StackTrace":" at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType) in //Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:line 989\r\n at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) in //Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:line 196\r\n at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) in //Src/Newtonsoft.Json/JsonSerializer.cs:line 907\r\n at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings) in //Src/Newtonsoft.Json/JsonConvert.cs:line 828\r\n at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings) in //Src/Newtonsoft.Json/JsonConvert.cs:line 786\r\n at Umbraco.Web.PropertyEditors.MultipleValueEditor.ToEditor(Property property, IDataTypeService dataTypeService, String culture, String segment) in D:\a\1\s\src\Umbraco.Web\PropertyEditors\MultipleValueEditor.cs:line 38\r\n at Umbraco.Web.PropertyEditors.NestedContentPropertyEditor.NestedContentPropertyValueEditor.ToEditor(Property property, IDataTypeService dataTypeService, String culture, String segment) in D:\a\1\s\src\Umbraco.Web\PropertyEditors\NestedContentPropertyEditor.cs:line 187\r\n at Umbraco.Web.Models.Mapping.ContentPropertyBasicMapper1.Map(Property property, TDestination dest, MapperContext context) in D:\\a\\1\\s\\src\\Umbraco.Web\\Models\\Mapping\\ContentPropertyBasicMapper.cs:line 74\r\n at Umbraco.Web.Models.Mapping.ContentPropertyDisplayMapper.Map(Property originalProp, ContentPropertyDisplay dest, MapperContext context) in D:\\a\\1\\s\\src\\Umbraco.Web\\Models\\Mapping\\ContentPropertyDisplayMapper.cs:line 24\r\n at Umbraco.Core.Mapping.UmbracoMapper.Map[TTarget](Object source, Type sourceType, MapperContext context) in D:\\a\\1\\s\\src\\Umbraco.Core\\Mapping\\UmbracoMapper.cs:line 207\r\n at Umbraco.Core.Mapping.UmbracoMapper.Map[TSource,TTarget](TSource source, MapperContext context) in D:\\a\\1\\s\\src\\Umbraco.Core\\Mapping\\UmbracoMapper.cs:line 190\r\n at System.Linq.Enumerable.WhereSelectEnumerableIterator2.MoveNext()\r\n at System.Collections.Generic.List1..ctor(IEnumerable1 collection)\r\n at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source)\r\n at Umbraco.Web.Models.Mapping.TabsAndPropertiesMapper1.Map(TSource source, MapperContext context) in D:\a\1\s\src\Umbraco.Web\Models\Mapping\TabsAndPropertiesMapper.cs:line 150\r\n at Umbraco.Web.Models.Mapping.ContentMapDefinition.Map(IContent source, ContentVariantDisplay target, MapperContext context) in D:\a\1\s\src\Umbraco.Web\Models\Mapping\ContentMapDefinition.cs:line 114\r\n at Umbraco.Core.Mapping.UmbracoMapper.Map[TTarget](Object source, Type sourceType, MapperContext context) in D:\a\1\s\src\Umbraco.Core\Mapping\UmbracoMapper.cs:line 207\r\n at Umbraco.Web.Models.Mapping.ContentVariantMapper.Map(IContent source, MapperContext context) in D:\a\1\s\src\Umbraco.Web\Models\Mapping\ContentVariantMapper.cs:line 28\r\n at Umbraco.Web.Models.Mapping.ContentMapDefinition.Map(IContent source, ContentItemDisplay target, MapperContext context) in D:\a\1\s\src\Umbraco.Web\Models\Mapping\ContentMapDefinition.cs:line 99\r\n at Umbraco.Core.Mapping.UmbracoMapper.Map[TTarget](Object source, Type sourceType, MapperContext context) in D:\a\1\s\src\Umbraco.Core\Mapping\UmbracoMapper.cs:line 207\r\n at Umbraco.Web.Editors.ContentController.MapToDisplay(IContent content) in D:\a\1\s\src\Umbraco.Web\Editors\ContentController.cs:line 2162\r\n at lambdamethod(Closure , Object , Object[] )\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>cDisplayClass62.2(Object instance, Object[] methodParameters)\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ApiControllerActionInvoker.

    Any help ?

  • Marc Goodson 2148 posts 14353 karma points MVP 8x c-trib
    May 22, 2023 @ 08:06
    Marc Goodson
    100

    Hi Pratik

    Has that page with Id 1057 got a Nested Content Property Editor on it?

    And if you go into the DataType definition for that property type, does it load correctly or is it missing the 'Document Type' that would define the repeating items... and if it is not missing that picked Document Type - has that Document Type been updated to be an Element Type as part of your migration?

    If that all looks correctly configured for the Nested Content Data Type for that page, then I'd consider 'flicking' it over temporarily to be a label, to hopefully see the underlying JSON that is being stored for the property (or you can query the db) - as it feels like the data might be missing something in the JSON to match the definition of the Data Type.

    But I would check the Data Type first, as correct that if it's awry may magically make it all work.

    regards

    marc

  • Pratik Ramani 9 posts 99 karma points
    May 22, 2023 @ 13:44
    Pratik Ramani
    0

    Yes Marc,

    Thanks for update, we are trying it.

  • Pratik Ramani 9 posts 99 karma points
    May 24, 2023 @ 14:03
    Pratik Ramani
    0

    Hi Marc,

    We could fix it but now wecome screen stopped opening and showing below error :

    Page not found No template exists to render the document at url '/'. In addition, no template exists to render the custom 404.

    This page can be replaced with a custom 404. Check the documentation for "custom 404".

    Any help appriciated.

  • Marc Goodson 2148 posts 14353 karma points MVP 8x c-trib
    May 25, 2023 @ 12:09
    Marc Goodson
    0

    Hi Pratik

    Do you mean the Umbraco backoffice, or the homepage of the site?

    If you can still get into Umbraco - has the homepage got a template selected and does that template exist?

    regards

    Marc

  • Pratik Ramani 9 posts 99 karma points
    May 25, 2023 @ 12:36
    Pratik Ramani
    0

    Hi Marc,

    Its The homepage site.

    how we can set the root template in back office?

    Also in the Umbraco project code side, how can we route to open our root template when site runs?

  • Marc Goodson 2148 posts 14353 karma points MVP 8x c-trib
    May 26, 2023 @ 08:15
    Marc Goodson
    0

    Hi Pratik

    On the 'info' tab for your Homepage in the backoffice there is a dropdown for 'Template'

    If that's not specifying a valid template, that would explain a 404.

    Depending on how your site is implemented though, and because of your recent migration, then previously you might have been 'hijacking' the request to the homepage using a technique called route hijacking.

    https://our.umbraco.com/Documentation/Reference/Routing/Custom-Controllers/

    So if your homepage document type has an alias of homepage, you might be missing a HomepageController in your migrated project that was previously routing the Homepage.

    regards

    Marc

Please Sign in or register to post replies

Write your reply to:

Draft