mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Moving GroupId check up as updates are made too early
This commit is contained in:
@@ -30,6 +30,15 @@ namespace Orchard.ContentManagement.Drivers {
|
||||
if (string.IsNullOrEmpty(placement.Location) || placement.Location == "-")
|
||||
return;
|
||||
|
||||
// parse group placement
|
||||
var group = placement.GetGroup();
|
||||
if (!String.IsNullOrEmpty(group)) {
|
||||
_groupId = group;
|
||||
}
|
||||
|
||||
if (!string.Equals(context.GroupId ?? "", _groupId ?? "", StringComparison.OrdinalIgnoreCase))
|
||||
return;
|
||||
|
||||
dynamic parentShape = context.Shape;
|
||||
context.ContentPart = ContentPart;
|
||||
|
||||
@@ -62,15 +71,6 @@ namespace Orchard.ContentManagement.Drivers {
|
||||
newShapeMetadata.Wrappers.Clear();
|
||||
}
|
||||
|
||||
// parse group placement
|
||||
var group = placement.GetGroup();
|
||||
if (!String.IsNullOrEmpty(group)) {
|
||||
_groupId = group;
|
||||
}
|
||||
|
||||
if (!string.Equals(context.GroupId ?? "", _groupId ?? "", StringComparison.OrdinalIgnoreCase))
|
||||
return;
|
||||
|
||||
foreach (var alternate in placement.Alternates) {
|
||||
newShapeMetadata.Alternates.Add(alternate);
|
||||
}
|
||||
|
Reference in New Issue
Block a user