mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Fix bug with blog post
blog post container field wasn't set properly. This is due to a change in order of events between CommonAspect and BlogPost activation. As a temporary workound, change CommonAspect to force setting container and owner record fields if they have a value when Activated event is processed. --HG-- branch : dev
This commit is contained in:
@@ -129,6 +129,10 @@ namespace Orchard.Core.Common.Handlers {
|
||||
return user;
|
||||
});
|
||||
|
||||
// Force call to setter if we had already set a value
|
||||
if (aspect.OwnerField.Value != null)
|
||||
aspect.OwnerField.Value = aspect.OwnerField.Value;
|
||||
|
||||
aspect.ContainerField.Setter(container => {
|
||||
if (container == null) {
|
||||
aspect.Record.Container = null;
|
||||
@@ -138,6 +142,10 @@ namespace Orchard.Core.Common.Handlers {
|
||||
}
|
||||
return container;
|
||||
});
|
||||
|
||||
// Force call to setter if we had already set a value
|
||||
if (aspect.ContainerField.Value != null)
|
||||
aspect.ContainerField.Value = aspect.ContainerField.Value;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user