Forced the handler to "publish" the fields of a menu to ensure "Value" is updated in Orchard Projections FieldIndexRecords instead of "LatestValue" only.

This commit is contained in:
Andrea Piovanelli 2025-04-09 16:50:50 +02:00
parent 3561be6e37
commit 6983d65758

View File

@ -244,8 +244,7 @@ namespace Orchard.Core.Navigation.Controllers {
public ActionResult EditPOST(int id, string returnUrl) {
return EditPOST(id, returnUrl, contentItem => {
if (!contentItem.Has<IPublishingControlAspect>()
&& !contentItem.TypeDefinition.Settings.GetModel<ContentTypeSettings>().Draftable
&& contentItem.IsPublished())
&& !contentItem.TypeDefinition.Settings.GetModel<ContentTypeSettings>().Draftable)
_contentManager.Publish(contentItem);
});
}