Fixes #8181: Prevent placement info loss (#8182)

Fixes #8181
This commit is contained in:
Hermes Sbicego
2019-04-18 21:09:04 +02:00
committed by Sébastien Ros
parent 9beedf8b19
commit c7f9cddb76

View File

@@ -63,8 +63,14 @@ namespace Orchard.ContentTypes.Services {
if (!String.IsNullOrEmpty(customPlacement.Placement.Position)) {
location = String.Concat(location, ":", customPlacement.Placement.Position);
}
return new PlacementInfo { Location = location };
// clone the identified Placement.info into a new one in order to keep original informations like Wrappers and Alternates
var originalPlacementInfo = placement(ctx);
return new PlacementInfo {
Location = location,
Alternates = originalPlacementInfo.Alternates,
ShapeType = originalPlacementInfo.ShapeType,
Wrappers = originalPlacementInfo.Wrappers
};
}
}
}
@@ -75,4 +81,4 @@ namespace Orchard.ContentTypes.Services {
}
}
}
}
}