Quantcast
Channel: Developer to developer
Viewing all articles
Browse latest Browse all 9076

Problems when indexing after upgrade

$
0
0

Hi,

I did some software upgrades for our customer the other day, everything seemed to work fine, but when I try to re-index stuff, no pages will be indexed, instead I got loads of errors ( in the logs ), this happens both when the "EPiServer Find Content Indexing Job" and when I for ex publish a page.

Nothing is changed in the code, except for new software versions.

Parts of packages.config ( now, after upgrade )

<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net471" /><package id="EPiServer.CMS" version="11.13.1" targetFramework="net471" /><package id="EPiServer.CMS.AspNet" version="11.13.1" targetFramework="net471" /><package id="EPiServer.CMS.Core" version="11.13.1" targetFramework="net471" /><package id="EPiServer.CMS.TinyMce" version="2.8.1" targetFramework="net471" /><package id="EPiServer.CMS.UI" version="11.21.7" targetFramework="net471" /><package id="EPiServer.CMS.UI.Core" version="11.21.7" targetFramework="net471" /><package id="EPiServer.Find" version="13.2.4" targetFramework="net471" /><package id="EPiServer.Find.Cms" version="13.2.4" targetFramework="net471" /><package id="EPiServer.Find.Framework" version="13.2.4" targetFramework="net471" /><package id="EPiServer.Forms" version="4.25.1" targetFramework="net471" /><package id="EPiServer.Forms.Core" version="4.25.1" targetFramework="net471" /><package id="EPiServer.Forms.UI" version="4.25.1" targetFramework="net471" /><package id="EPiServer.Framework" version="11.13.1" targetFramework="net471" /><package id="EPiServer.Framework.AspNet" version="11.13.1" targetFramework="net471" /><package id="EPiServer.Logging.Log4Net" version="2.2.2" targetFramework="net471" /><package id="EPiServer.ServiceLocation.StructureMap" version="2.0.2" targetFramework="net471" />




Parts of packages.config ( before upgrade )

<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net471" /><package id="EPiServer.CMS" version="11.10.6" targetFramework="net471" /><package id="EPiServer.CMS.AspNet" version="11.11.0" targetFramework="net471" /><package id="EPiServer.CMS.Core" version="11.11.0" targetFramework="net471" /><package id="EPiServer.CMS.TinyMce" version="2.7.1" targetFramework="net471" /><package id="EPiServer.CMS.UI" version="11.13.2" targetFramework="net471" /><package id="EPiServer.CMS.UI.Core" version="11.13.2" targetFramework="net471" /><package id="EPiServer.Find" version="13.0.5" targetFramework="net471" /><package id="EPiServer.Find.Cms" version="13.0.5" targetFramework="net471" /><package id="EPiServer.Find.Framework" version="13.0.5" targetFramework="net471" /><package id="EPiServer.Forms" version="4.22.0" targetFramework="net471" /><package id="EPiServer.Forms.Core" version="4.22.0" targetFramework="net471" /><package id="EPiServer.Forms.UI" version="4.22.0" targetFramework="net471" /><package id="EPiServer.Framework" version="11.11.0" targetFramework="net471" /><package id="EPiServer.Framework.AspNet" version="11.11.0" targetFramework="net471" /><package id="EPiServer.Logging.Log4Net" version="2.2.2" targetFramework="net471" /><package id="EPiServer.ServiceLocation.StructureMap" version="2.0.1" targetFramework="net471" />

Parts of the Errors from logs ( this is when I try to publish/Index even my simplest "ContainerPage", code for that one below ), I remove stuff that's just reapeated
2019-10-09 08:59:18,021 [100] ERROR EPiServer.Find.Cms.ContentEventIndexer: An exception occurred while indexing (IContent). Self referencing loop detected for property 'ManifestModule' with type 'System.Reflection.RuntimeModule'. Path 'Property[0].LinkMapper.Accessor.Method.Module.Assembly'. The loop was detected in VolvoFinansBank.Web.Models.Pages.ContainerPage. To correct this you can exclude one of the properties (or otherwise mapped fields) that are causing the loop by modifying the Client class' conventions. You may also modify the serializer to ignore self references. If you require the fields causing the loop to be serialized you may annotate the one of the classes in the loop with [JsonObject(IsReference = true)] or modify the JsonContract for one of the types to use IsReference = true which also can be done by modifying the Client class' conventions..
EPiServer.Find.SelfReferencingLoopException: Self referencing loop detected for property 'ManifestModule' with type 'System.Reflection.RuntimeModule'. Path 'Property[0].LinkMapper.Accessor.Method.Module.Assembly'. The loop was detected in VolvoFinansBank.Web.Models.Pages.ContainerPage. To correct this you can exclude one of the properties (or otherwise mapped fields) that are causing the loop by modifying the Client class' conventions. You may also modify the serializer to ignore self references. If you require the fields causing the loop to be serialized you may annotate the one of the classes in the loop with [JsonObject(IsReference = true)] or modify the JsonContract for one of the types to use IsReference = true which also can be done by modifying the Client class' conventions. ---> Newtonsoft.Json.JsonSerializationException: Self referencing loop detected for property 'ManifestModule' with type 'System.Reflection.RuntimeModule'. Path 'Property[0].LinkMapper.Accessor.Method.Module.Assembly'.
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.CheckForCircularReference(JsonWriter writer, Object value, JsonProperty property, JsonContract contract, JsonContainerContract containerContract, JsonProperty containerProperty)

...

EPiServer.Find.SelfReferencingLoopException: Self referencing loop detected for property 'ManifestModule' with type 'System.Reflection.RuntimeModule'. Path 'Property[0].LinkMapper.Accessor.Method.Module.Assembly'. The loop was detected in VolvoFinansBank.Web.Models.Pages.ContainerPage. To correct this you can exclude one of the properties (or otherwise mapped fields) that are causing the loop by modifying the Client class' conventions. You may also modify the serializer to ignore self references. If you require the fields causing the loop to be serialized you may annotate the one of the classes in the loop with [JsonObject(IsReference = true)] or modify the JsonContract for one of the types to use IsReference = true which also can be done by modifying the Client class' conventions. ---> Newtonsoft.Json.JsonSerializationException: Self referencing loop detected for property 'ManifestModule' with type 'System.Reflection.RuntimeModule'. Path 'Property[0].LinkMapper.Accessor.Method.Module.Assembly'.

...

at EPiServer.Find.Api.BulkActionConverter.WriteJson(JsonWriter writer, Object value, JsonSerializer serializer)
--- End of inner exception stack trace ---
at EPiServer.Find.Api.BulkActionConverter.WriteJson(JsonWriter writer, Object value, JsonSerializer serializer)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeConvertable(JsonWriter writer, JsonConverter converter, Object value, JsonContract contract, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType)
at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType)
at EPiServer.Find.Json.Serializer.SerializeToTextWriter(JsonSerializer serializer, Object value, TextWriter textWriter)
at EPiServer.Find.Json.Serializer.SerializeObjectsToJsonRequest(JsonSerializer serializer, IJsonRequest jsonRequest, IEnumerable values)
at EPiServer.Find.Api.BulkCommand.Execute(List`1& serializationFailures)
at EPiServer.Find.Api.BulkCommand.Execute()
at EPiServer.Find.Cms.ContentIndexer.IndexWithRetry(IContent[] contents, Int32 maxRetries, Boolean deleteLanguageRoutingDuplicatesOnIndex)
at EPiServer.Find.Cms.ContentIndexer.Index(IEnumerable`1 contents, IndexOptions options)
at EPiServer.Find.Cms.ContentEventIndexer.Index(IEnumerable`1 contentLinks)
at EPiServer.Find.Cms.ContentEventIndexer.Sync(IEnumerable`1 contentToIndex, HashSet`1 contentToIndexSet, Func`1 index)
at EPiServer.Find.Cms.ContentEventIndexer.IndexPageQueue(IEnumerable`1 contentToIndex)
at EPiServer.Find.Cms.ContentEventIndexer.IndexPageQueue()

Code for ContainerPage

public class ContainerPage : PageData, IContainerPage, Business.Descriptors.Icons.IUseContainerPageTreeIcon
{
public override void SetDefaultValues(ContentType contentType)
{
base.SetDefaultValues(contentType);
VisibleInMenu = false;
}
}

 

Also, in a InitModule, I tried to add handling for ReferenceLoopHandling ( did not need that before upgrade ), but that did not help either 

    [InitializableModule]
    [ModuleDependency(typeof(FrameworkInitialization))]
    public class WebApiInitialization : IInitializableModule
    {
        public void Initialize(InitializationEngine context)
        {
            // Enable Web API routing
            GlobalConfiguration.Configure(config =>
            {
...
                var settings = jsonFormatter.SerializerSettings;
                settings.ReferenceLoopHandling = ReferenceLoopHandling.Ignore; // added this line, but it did not helt
...

 

Will be very happy if you have any ideas on how to solve this :)


Viewing all articles
Browse latest Browse all 9076

Trending Articles