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:
Renaud Paquay
2010-04-30 21:56:35 -07:00
parent d84f4ee0db
commit 11e1fef85a

View File

@@ -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;
}