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

#4852: Wrap IOrchardShellEvents in a work context #5738

Merged

Conversation

harmony7
Copy link
Contributor

@harmony7 harmony7 commented Sep 3, 2015

This is a fix for #4852

This fixes some of the problems we are seeing relating to being unable to inject HttpContextBase during IOrchardShellEvents.

This has mainly been a problem when attempting to access ContentManager or site settings in Data Migrations, such as seen in #5305 #5490 #5528.

We seem to only be hitting the problem when Orchard is compiled under VS2015, but this is probably the correct behavior even when building under previous environments.

@jersiovic
Copy link
Contributor

It works perfect, the problems has disappeared.
Thank you so much!!!

@sebastienros
Copy link
Member

I think we should try your change and revert this: ce630f9

And also revert all the other changes related to HttpContext resolution, including the Shape Tracing one in the dev branch.

@harmony7
Copy link
Contributor Author

harmony7 commented Sep 3, 2015

@sebastienros is there anything else i need to do, or are you guys going to be doing the reverting ?

@sebastienros
Copy link
Member

If you want to try to revert all the changes and ensure it still fixes the reported changes then I would be more than happy. On the 1.9.x branch.

@harmony7
Copy link
Contributor Author

harmony7 commented Sep 3, 2015

I can try reverting ce630f9. There is also 4b59569. Are there any other change sets?

@harmony7
Copy link
Contributor Author

harmony7 commented Sep 3, 2015

Actually, though, this problem (injecting ContentManager in Migrations) occurs in 1.8 on VS2015 too. My change fixes it on that as well, and since 1.8 obviously doesn't have any of the recent HttpContext changes, I'm pretty sure this is all we need.

@sebastienros
Copy link
Member

Would you be able to revert all these unnecessary changes then? //cc @jtkech

@sebastienros
Copy link
Member

I will try to add your change here, and also revert the fixes for the 3 issues you mentioned if I can't repro them.

sebastienros added a commit that referenced this pull request Sep 4, 2015
…ntext

#4852: Wrap IOrchardShellEvents in a work context
@sebastienros sebastienros merged commit e118695 into OrchardCMS:1.9.x Sep 4, 2015
@harmony7 harmony7 deleted the 4852-orchardshellevents-workcontext branch September 4, 2015 17:22
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

Successfully merging this pull request may close these issues.

4 participants