I'm working on Kentico 10. Our system have different resource types and different clients.
For example:
When creating a page, in the form, we are selecting following-
Tile: History
ResourceType : Sports
Client : GoaFootballClub
Now when saving this page, we are showing this in a tree like this:
Sports
GoaFootballClub
2020
Feb
History
Now, I'm able to do above in:
DocumentEvents.Insert.After += Document_Insert_After;
When somebody updates the page, they can choose different ResourceType and Client,
Hence, I want to do the same on update. For this, I added code in:
DocumentEvents.Update.After += Document_Update_After;
But this method is never getting fired when I save the page.
If I move the code in:
WorkflowEvents.SaveVersion.After += SaveVersion_After;
Then it works, but sometimes multiple times.
I hope I was able to explain my problem.
My question is why Document_Update_After is not getting fired.
private void Document_Update_After(object sender, DocumentEventArgs e)
{
EventLogProvider.LogEvent(EventType.INFORMATION, "Update after", "update_after", eventDescription: "update version after");
HandleDocumentUpdated(e);
}