I would think there's something supersimple I'm missing, but I can't find where I'm going wrong.
I have a feature deploying a default.aspx page with two CQWP webparts. I use the AllUsersWebPart method and specify WebPartZone and WebPartOrder. Even so, the webparts are deployed in seemingly random order.
Here's my relevant XML from the Elements.xml file that deploys the default.aspx page:
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Module Name="SectionFrontPage" Path="SectionFrontPage" Url="" >
<File Path="default.aspx" Url="default.aspx" IgnoreIfAlreadyExists="TRUE" >
<AllUsersWebPart ID="News1" WebPartZoneID="ContentLeft" WebPartOrder="0">
<![CDATA[
<?xml version="1.0" encoding="utf-8"?>
<webParts>
<webPart xmlns="http://schemas.microsoft.com/WebPart/v3">
<metaData>
<type name="Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart, Microsoft.SharePoint.Publishing, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
<importErrorMessage>Cannot import this Web Part.</importErrorMessage>
</metaData>
<data>
<properties>
<property name="Title" type="string">News from this section</property>
</properties>
</data>
</webPart>
</webParts>
]]>
</AllUsersWebPart>
<AllUsersWebPart ID="News2" WebPartZoneID="ContentLeft" WebPartOrder="1">
<![CDATA[
<?xml version="1.0" encoding="utf-8"?>
<webParts>
<webPart xmlns="http://schemas.microsoft.com/WebPart/v3">
<metaData>
<type name="Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart, Microsoft.SharePoint.Publishing, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
<importErrorMessage>Cannot import this Web Part.</importErrorMessage>
</metaData>
<data>
<properties>
<property name="Title" type="string">News from subsections</property>
</properties>
</data>
</webPart>
</webParts>
]]>
</AllUsersWebPart>
</File>
</Module>
</Elements>