I have a SharePoint feature that installs a new page layout.
A requirement for this feature was to install the page layout with a default web part, so that when the user runs through the 'Create Page' action, the page is created with a web part already on the page.
So, I've tried adding a AllUsersWebPart node in the Elements definition of the page eg.
<Elements>
...
<Module ...>
...
<File ...>
<AllUsersWebPart ...>
...
</AllUsersWebPart>
</File>
...
</Module>
</Elements>
Installed, deployed the feature etc and of course got the helpful 'No parameterless constructor defined for this object' error - a problem with my definition in the Elements.xml most likely.
Now the REAL problem I've got is that I've tried deleting the AllUsersWebPart section from the feature definition (so that the page has no web parts on it when created) and, due to a fantastic bug in SharePoint, the web part is still left defined for the page layout, even though the feature definition says differently - I found some details about this on http://sharepointblog.buus-oestergaard.dk/post/Default-webparts-in-sharepoint-pagelayouts.aspx (Point #2).
I've tried upgrading & removing / re-installing the feature but to no effect - how can I remove this web part from the feature / content db so that I can have the feature just install the page layout or put the correct web part definition in the feature?