private void Document_ChangeOrder_After(object sender, DocumentChangeOrderEventArgs e)
        {
            // Sometimes ChangeOrder is triggered before the insert (if it inserts before other records),
            // So will use recursion helper to prevent this from running on the insert as well.
            RecursionControl PreventInsertAfter = new RecursionControl("PreventInsertAfter" + e.Node.NodeID);
            var Trigger = PreventInsertAfter.Continue;

            try
            {
                DynamicRouteEventHelper.DocumentInsertUpdated(e.Node.NodeID);
            }
            catch (UrlSlugCollisionException ex)
            {
                LogErrorsInSeparateThread(ex, "DynamicRouting", "UrlSlugConflict", $"Occurred on Document Change Order for Node {e.Node.NodeAliasPath}");
                e.Cancel();
            }
            catch (Exception ex)
            {
                LogErrorsInSeparateThread(ex, "DynamicRouting", "Error", $"Occurred on Document Change Order for Node {e.Node.NodeAliasPath}");
            }
        }
Beispiel #2
0
 private void Document_ChangeOrder_After(object sender, DocumentChangeOrderEventArgs e)
 {
     DynamicRouteEventHelper.DocumentInsertUpdated(e.Node.NodeID);
 }