Kentico/xperience-algolia

Bug: searchModelType in AlgoliaSearch_IndexedContent is always null

Closed this issue · 1 comments

Brief bug description

searchModelType is always null, so when I navigate to the "Indexed Content" tab of the Algolia Search module in the CMS, it throws a null reference exception on line 47.

var modelProperties = searchModelType.GetProperties();

I believe the model type should have been assigned in OnLoad() somewhere after line 35:

searchModelType = registerIndexAttribute.Type;
LoadProperties();
LoadPaths();

I can make a PR to resolve this issue.

Repro steps

  • Import the custom module UI / code into the CMS project
  • Start the CMS with valid configuration for the index
  • Navigate to "Algolia search > Index properties > Indexed content"

Expected behavior

No null reference exception

Test environment

  • net48 CMSApp

Additional context

The custom module Kentico.Xperience.AlgoliaSearch.1.0.0.zip package also didn't import the files into the CMS project (git showed no changes and I could not find them on the file system. I had to manually copy them from the .zip and rename them, removing the .export suffix.

Screenshots

What a stupid mistake! Thanks for reporting it 😄 In regards to the Additional context, I think you may have imported the ZIP package without the Import code files option selected (I wasn't able to reproduce the problem). I've updated the README to clarify the import steps.