Kentico / xperience-by-kentico-algolia

Enables the creation of Algolia search indexes and the indexing of Xperience content tree pages using a code-first approach.
https://www.kentico.com/
MIT License
4 stars 1 forks source link

Initial creation of pages under workflow get sent as Updates #12

Closed jkerb135 closed 1 year ago

jkerb135 commented 1 year ago

Brief bug description

New pages under workflow are failing the check below to get the AlgoliaTaskType and being sent as UPDATES instead because the Workflow History of the page after initial save is created as version 0.1 making the second condition below false.

 if (eventName.Equals(WorkflowEvents.Publish.Name, StringComparison.OrdinalIgnoreCase) && node.WorkflowHistory.Count == 0)
 {
    return AlgoliaTaskType.CREATE;
 }

What went wrong?

Repro steps

Create a new page under workflow Save that page Publish The page will get sent as a partial update to algolia with missing record information

Expected behavior

The page should be sent as a create

kentico-jaroslavn commented 1 year ago

Hello Josh, thanks for reporting the issue. We will have a look on it.

jkerb135 commented 1 year ago

@kentico-jaroslavn one addition item I have noticed is that if you move a document in the tree to another folder it will not update send the updated path as an update resulting in the page path into algolia to be mismatched,

ondrejhenek commented 1 year ago

Hi Josh! We are still looking at this issue and we are getting close to a resolution. We are also changing our approach to supporting our integrations and shortening the bugfixing time. :) Please, stay tuned.

hesspavel commented 1 year ago

Hi @jkerb135,

I tried simulating the error again, this time against version 25 and the newly created page gets indexed correctly.

The second mentioned problem is still ongoing at the moment. However, it is possible to ensure re-indexing by editing the page and then publishing it.

Can you try upgrading to the latest version?

ondrejhenek commented 1 year ago

Hi @jkerb135 , since the underlying issue could not be replicated and the second problem has a workaround, we are closing this issue. We will be revising this integration soon to keep it up with the current product version and we will aim to resolve the workaround as well.