Open jonasboman opened 2 weeks ago
@valdisiljuconoks do you have any input here? :)
Perhaps add logic in ContentUrlHistoryEvents to also take into consideration if the moved page is published or not. I guess I could use my own implementation of ContentUrlHistoryEvents. :)
I am creating a scheduled job in optimizely cms 12, that should expire a page (based om some parameters) and also move the page. After that I wish to create a custom redirect to the old parent.
Having some issues with this.
It seems like NotFound has a Moved event hooked up that creates Redirects even on expired pages. When I use IRedirectService and AddOrUpdate method, it works, but I think the move-event (e g MovedContentRegistratorBackgroundService ) is lagging and overwrites the redirect I am creating.
Is there a way around this?
_redirectsService.DeleteByOldUrl(oldPageUrl); _redirectsService.AddOrUpdate(new CustomRedirect(oldPageUrl, parentPageUrl, true, RedirectType.Temporary));