Placement.info UpdateEditor issue

Topics: Core, Writing modules
Sep 2, 2013 at 3:50 AM
Edited Sep 2, 2013 at 3:52 AM
When I call UpdateEditor in a post action of a controller, when the placement.info have nested Match tags like this:
    <Match Path="My.Module/*">
        <Match ContentType="Blog">
            <Place Parts_Title="Header:Before"/>
            <Place Parts_Common_Metadata="-"/>
            <Place Parts_Common_Body="Footer:3"/>
            <Place Parts_MyPart="Footer:Before"/>
            <Place Parts_ListOfComments="Footer:After"/>
            <Place Parts_CommentForm="-"/>
        </Match>


        <Place Parts_Comments_Enable="-" />
        <Place Parts_Tags_Edit="-" />
        <Place Parts_Autoroute_Edit="-" />
        <Place Parts_Common_Date_Edit="-" />
        <Place Parts_MyPart_Edit="Content:1"/>
    </Match>
I got ArgumentNullExceptions in the log and MyPart Editor post method is not called.

2013-09-02 06:38:44,379 [21] Orchard.ContentManagement.Drivers.Coordinators.ContentPartDriverCoordinator - ArgumentNullException thrown from IContentPartDriver by Orchard.Core.Common.DateEditor.DateEditorDriver
System.ArgumentNullException: Değer null olamaz.
Parametre name: virtualPath
konum: System.Web.VirtualPath.Create(String virtualPath, VirtualPathOptions options)
konum: System.Web.VirtualPathUtility.ToAppRelative(String virtualPath)
konum: Orchard.DisplayManagement.Descriptors.ShapePlacementStrategy.ShapePlacementParsingStrategy.<>c__DisplayClass21.<BuildPredicate>b__15(ShapePlacementContext ctx) C:\Users\serdar\Documents\undp\orchard\orchard-projects\src\Orchard\DisplayManagement\Descriptors\ShapePlacementStrategy\ShapePlacementParsingStrategy.cs

and more exceptions from autoroute driver and others sent to "-" and also from MyPart driver.

When the placement.info is like:
    <Match Path="Orchard.TipsTR/*">
        <Match ContentType="Blog">
            <Place Parts_Title="Header:Before"/>
            <Place Parts_Common_Metadata="-"/>
            <Place Parts_Common_Body="Footer:3"/>
            <Place Parts_MyPart="Footer:Before"/>
            <Place Parts_ListOfComments="Footer:After"/>
            <Place Parts_CommentForm="-"/>
        </Match>
    </Match>


    <Place Parts_Comments_Enable="-" />
    <Place Parts_Tags_Edit="-" />
    <Place Parts_Autoroute_Edit="-" />
    <Place Parts_Common_Date_Edit="-" />
    <Place Parts_MyPart_Edit="Content:1"/>
it works without an exception and update works.

So I guess this is a bug, but to make sure, is the first placement syntax correct? Does white space (empty lines) matter?
Coordinator
Sep 2, 2013 at 6:18 AM
Please file a bug.
Sep 2, 2013 at 6:23 AM