OrchardCMS / Orchard

Orchard is a free, open source, community-focused Content Management System built on the ASP.NET MVC platform.
https://orchardproject.net
BSD 3-Clause "New" or "Revised" License
2.37k stars 1.12k forks source link

Shell settings changes from background tasks won't cause a shell restart #4242

Open orchardbot opened 10 years ago

orchardbot commented 10 years ago

@Piedone created: https://orchard.codeplex.com/workitem/20413

If you implement the interface in a custom module your implementation won't get called when the event is fired. IShellSettingsManagerEventHandler is somewhat special but nevertheless it's an IEventHandler so one expects it to work as any other event handler.

Tested on current latest 1.x and 1.7.x, neither works. I don't know whether this worked at all once.

We could solve this for example by calling OrchardHost.EndRequest() or something similar when all background tasks are executed (and thus process ProcessingEngine tasks as well as restart changed shells).

orchardbot commented 10 years ago

@Piedone commented:

Hmm, this is strange. It does work sometimes. Can't isolate a precise repro yet.

orchardbot commented 10 years ago

@Piedone commented:

I think I found a repro: it doesn't work if the Save() call is invoked from a background task.

orchardbot commented 10 years ago

@StanleyGoldman commented:

Fix please!

orchardbot commented 9 years ago

@Piedone commented:

Related: https://github.com/OrchardCMS/Orchard/issues/4542 https://orchard.codeplex.com/workitem/20713