Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirect Tracking throws error on background thread #6466

Closed
KevinJump opened this issue Sep 27, 2019 · 1 comment
Closed

Redirect Tracking throws error on background thread #6466

KevinJump opened this issue Sep 27, 2019 · 1 comment

Comments

@KevinJump
Copy link
Contributor

similar to #6464 the RedirectTrackingComponent code throws errors if a content item is published in a background thread.

https://github.com/umbraco/Umbraco-CMS/blob/v8/dev/src/Umbraco.Web/Routing/RedirectTrackingComponent.cs

Principly here ,
https://github.com/umbraco/Umbraco-CMS/blob/v8/dev/src/Umbraco.Web/Routing/RedirectTrackingComponent.cs#L73

There is no HttpContext (i think) so this errors

in other places in the on the page

// that event is a distributed even that triggers on all nodes
// BUT it should totally NOT run on nodes other that the one that handled the other events
// and besides, it cannot run on a background thread!

Questions:

  • is publishing on a background thread ever supported?
  • would it be OK to have this fail silently if there is no HttpContext or does it need some no httpContext way of working ?
@KevinJump
Copy link
Contributor Author

the method outlined in #4572 by @zpqrtbnk #4572 (comment) enables this to work.

you just have to make sure the calling component is wrapping its code in the EnsureUmbracoContext call to get the context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant