Try our conversational search powered by Generative AI!

Find to index custom page provider contents?

Vote:
 

Dear experts,

I am using CMS6 R2 version.

I would like to know if I can index custom page providers data using Episerver Find?

At the moment, I have everything set up and episerver Find is working fine on other pages/types.

As soon as I filled the page with custom search providers, and assign their strongly type to index.
The service does not seem to do anything, just long wait and at the end the following error appears.

Indexing job [CIMAGlobal] [Page]: Reindexing completed.
ExecutionTime: 11minutes 19seconds
Number of pages indexed: 0
Number of page errors: 0
Number of batch errors: 110
An exception occured while fetching pages. The given key was not present in the dictionary.. If you are using PageTypeBuilder please make sure that you are using >= 1.3.1. (see log for more information) "The job is running." just this message, which I found it is not indexing any of the custom page provider pages.

I am able to index all other pages except these.
Is there a way to index custom page provider pages? Can anyone guide me to correct direction?

Thanks in advance.

Nazim

#88723
Jul 28, 2014 13:22
Vote:
 

I am still figuring it out. I have put a epi Find log files, which gives me the following detailed error? Any ideas?

2014-07-28 11:56:57,127 ERROR [72] EPiServer.Find.Cms.PageIndexer.ReIndex - An exception occured while fetching pages. Object reference not set to an instance of an object.. If you are using PageTypeBuilder please make sure that you are using >= 1.3.1.
System.NullReferenceException: Object reference not set to an instance of an object.
   at CCLClean.PageProviders.Base.ProviderBase.GetPrototype(String pageTypeName) in d:\DevRoot\CIMA\cimaglobal.com\Search\Src\CCLClean.PageProviders.Base\ProviderBase.cs:line 1034
   at CCLClean.PageProviders.Base.ProviderBase.InitialisePageData_UsePrototype(ProviderData thisPageData, PageReference pageLink, List`1 pageLanguages) in d:\DevRoot\CIMA\cimaglobal.com\Search\Src\CCLClean.PageProviders.Base\ProviderBase.cs:line 212
   at CIMA.PageProviders.Base.ProviderBase.GetLocalPage(PageReference pageLink, ILanguageSelector languageSelector) in d:\DevRoot\CCLClean\CCLCleanglobal.com\Search\Src\CCLClean.PageProviders.Base\ProviderBase.cs:line 166
   at EPiServer.Core.PageProviderBase.<>c__DisplayClass4.b__3()
   at EPiServer.Core.OptimisticCache`1.Read(String cacheKey, ReadAndCacheObject`1 readAndCacheObject)
   at EPiServer.Core.PageProviderBase.GetPageInternal(PageReference pageLink, ILanguageSelector selector)
   at EPiServer.Core.PageProviderBase.GetPage(PageReference pageLink, ILanguageSelector selector)
   at EPiServer.Core.PageProviderBase.GetPages(PageReferenceCollection pageReferences, ILanguageSelector selector)
   at EPiServer.Core.PageProviderBase.GetScatteredPages(IList`1 pageRefs, ILanguageSelector selector)
   at EPiServer.Core.PageProviderBase.GetPagesBatched(IList`1 pageLinks, ILanguageSelector selector)
   at EPiServer.DataFactory.GetPages(IList`1 pageLinks, ILanguageSelector selector)
   at EPiServer.Find.Cms.PageIndexer.ReIndex(Action`1 statusAction, Func`1 isStopped)

#88730
Edited, Jul 28, 2014 15:37
Vote:
 

Thanks very much for your reply.
I have managed to figure out that error, and now facing this error only.
An exception occured while indexing (Batch): Error getting value from 'Qualifications' on 'Castle.Proxies.ExemptionPageTypeProxy'..

ClClean.PageProviders.Data.ExceptionsQualificationsList' is a custom type defined which is a complex type
which is as follows

 [Serializable]
    [PageDefinitionTypePlugIn(DisplayName = "Exemptions Qualifications")]
    public class ExemptionsQualificationsProperty : GenericPropertyData
    {
        public override IPropertyControl CreatePropertyControl()
        {
            // We do not need to provide an interface for this
            return new GenericPropertyControl();
        }

    }

[Serializable]
public class ExceptionsQualification
{
public ExceptionsQualification()
{
Papers = new List();
}

public string Id
{ get; set; }

public string Name
{ get; set; }

public string Description
{ get; set; }

public List Papers
{ get; set; }

}

public class ExceptionsPaper
{
public ExceptionsPaper()
{
}

public string Name
{ get; set; }

public string Syllabus
{ get; set; }

public string CourseLevel
{ get; set; }

public List RequirementsList
{ get; set; }
}


This is the full error log
2014-07-28 15:19:57,303 ERROR [40] EPiServer.Find.Cms.PageIndexer.ReIndex - An exception occured while indexing (Batch): Error getting value from 'Qualifications' on 'Castle.Proxies.ExemptionPageTypeProxy'..
Newtonsoft.Json.JsonSerializationException: Error getting value from 'Qualifications' on 'Castle.Proxies.ExemptionPageTypeProxy'. ---> System.InvalidCastException: Unable to cast object of type 'CIMA.PageProviders.Data.ExceptionsQualificationsList' to type 'System.String'.
at Castle.Proxies.ExemptionPageTypeProxy.get_Qualifications()
at GetQualifications(Object )
at Newtonsoft.Json.Serialization.DynamicValueProvider.GetValue(Object target)
--- End of inner exception stack trace ---
at Newtonsoft.Json.Serialization.DynamicValueProvider.GetValue(Object target)
at EPiServer.Find.ClientConventions.FieldConventionBuilder`1.<>c__DisplayClass2.<>c__DisplayClass4.b__1(Object instance)
at EPiServer.Find.DelegateValueProvider.GetValue(Object target)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.CalculatePropertyValues(JsonWriter writer, Object value, JsonContainerContract contract, JsonProperty member, JsonProperty property, JsonContract& memberContract, Object& memberValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType)
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.SerializeToStringBuilder(JsonSerializer serializer, Object value, StringBuilder buffer)
at EPiServer.Find.Api.BulkCommand.Execute()
at EPiServer.Find.Client.Index(IEnumerable objectsToIndex)
at EPiServer.Find.Cms.PageIndexer.Index(IEnumerable`1 pages, IndexOptions options)
at EPiServer.Find.Cms.PageIndexer.ReIndex(Action`1 statusAction, Func`1 isStopped)

2014-07-28 15:19:57,303 ERROR [40] EPiServer.Find.Cms.PageIndexer.ReIndex - An exception occured while indexing (Batch): Error getting value from 'Qualifications' on 'Castle.Proxies.ExemptionPageTypeProxy'..
Newtonsoft.Json.JsonSerializationException: Error getting value from 'Qualifications' on 'Castle.Proxies.ExemptionPageTypeProxy'. ---> System.InvalidCastException: Unable to cast object of type 'CIMA.PageProviders.Data.ExceptionsQualificationsList' to type 'System.String'.
at Castle.Proxies.ExemptionPageTypeProxy.get_Qualifications()
at GetQualifications(Object )
at Newtonsoft.Json.Serialization.DynamicValueProvider.GetValue(Object target)
--- End of inner exception stack trace ---
at Newtonsoft.Json.Serialization.DynamicValueProvider.GetValue(Object target)
at EPiServer.Find.ClientConventions.FieldConventionBuilder`1.<>c__DisplayClass2.<>c__DisplayClass4.b__1(Object instance)
at EPiServer.Find.DelegateValueProvider.GetValue(Object target)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.CalculatePropertyValues(JsonWriter writer, Object value, JsonContainerContract contract, JsonProperty member, JsonProperty property, JsonContract& memberContract, Object& memberValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType)
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.SerializeToStringBuilder(JsonSerializer serializer, Object value, StringBuilder buffer)
at EPiServer.Find.Api.BulkCommand.Execute()
at EPiServer.Find.Client.Index(IEnumerable objectsToIndex)
at EPiServer.Find.Cms.PageIndexer.Index(IEnumerable`1 pages, IndexOptions options)
at EPiServer.Find.Cms.PageIndexer.ReIndex(Action`1 statusAction, Func`1 isStopped)

Any help will be greatly appreciated.

Thanks,
Naz

#88732
Edited, Jul 28, 2014 16:40
Vote:
 

Seems like Find is trying to cast your custom property to a string. Can you try adding the Serializable attribute to the ExceptionsPaper class?

What version of CMS is this related to?

#88748
Jul 29, 2014 9:37
Vote:
 

I have added the Serializable clause to that class too yesterday, But it was not working after that. Yes, it is right it is casting them into string.
Seems like the serialisation of the complex types are difficult to be serialised. Is there any way I can ahieve that? I am using version CMS 6 R2.

#88758
Jul 29, 2014 11:20
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.