I have a feature that defines a number of list instances to provision whenever a new site is created using a particular site definition. The list template for one of these instances has an item event receiver attached to it that handles the ItemAdding and ItemUpdating events. Here is an example of one of my list instances:
<ListInstance FeatureId="880944D1-A24E-4edf-B8A8-D4F2DCB33F95" Title="My List" Description="Blah blah blah" Id="1036" OnQuickLaunch="TRUE" QuickLaunchUrl="Lists/Sample/AllItems.aspx" TemplateType="100" Url="Lists/Sample"> <Data> <Rows> <Row> <Field Name="Title">My Item</Field> <Field Name="Description">Some information about the item.</Field> </Row> <Row> <Field Name="Title">My Second Item</Field> <Field Name="Description">Some information about this item.</Field> </Row> </Rows> </Data> </ListInstance>
The problem I am having is that the ItemAdding event receiver is called for the second item ("My Second Item"), but not the first item. Similarly, if I add more items, ItemAdding is called for all of the new items, but never for the first item. (I have verified that the handler is being called for all items except the first one by setting a break point in the event handler code.) Has anyone else experienced this?