Path scope is used in GET action but not in POST

Topics: Customizing Orchard, Writing modules
Feb 18, 2015 at 1:13 PM
I have a ContentItem "Entry" which consists (among others) of two ContentParts: EntryPart and GalleryPart. I would like to edit them in separate forms on separate pages. How would I go about doing this?

I thought I could do it via the file:

The two edit GET actions both construct the shape like this:
var model = _contentManager.BuildEditor(entry);
return View("Edit", (object) model);
Both return the same View, which just calls Display() to display the shape.

The two edit POST actions both save the information like this:
var entry = _contentManager.Get(id, VersionOptions.DraftRequired);
var model = _contentManager.UpdateEditor(entry, this);
In the file I set which ContentPart edit shapes should be displayed in which action:
  <Place Parts_Entry_Edit="Content:3" />
  <Match Path="/manage/entries/editpictures/*">
    <Place Parts_Gallery_Edit="Content:3" />
    <Place Parts_Entry_Edit="-" />
In the GET actions it works as expected: On action "editpictures" only the GalleryPart-Edit-View is displayed, not the EntryPart-Edit-View. On all other actions the EntryPart-Edit-View is diplayed, not the GalleryPart-Edit-View.

In the POST actions it only works partially: When the EntryPart-Edit-View is submitted its information is saved correctly. But when the GalleryPart-Edit-View is submitted its changes are not saved. During the POST of the "/manage/entries/editpictures/*" action it seems like Orchard (DefaultContentDisplay) somehow does not match the path with that of the file, and therefore creates a shape of the ContentItem "Entry" without the GalleryPart, and then cannot write the new information into the GalleryPart.

Question: Why does the BuildEditor method match the path in the but the UpdateEditor doesn't?

(I am using Orchard 1.7. I am also open to different approaches to separating the edit forms of the two ContentParts of one ContentItem.)