Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

Broken form when a people picker user was removed from the site collection

Hi !

We have cleaned our userinfolist some times ago by removing users that were not anymore in our AD.
There is now a bug in the form when editing an item, the form crash and SharePoint gave us a nice Correlation ID.
So, what is the issue ? When a form contains a people picker and when this people picker fields contains a user who has been removed from the Site Collection, the form will no longer load when editing this item.

Here is a small part of the stack trace :

Microsoft.SharePoint.SPUser..ctor(SPWeb web, SPSecurableObject scope, String strIdentifier, Object[,] arrUsersData, UInt32 index, Int32 iByParamId, String strByParamSID, String strByParamEmail, SPUserCollectionType userCollectionType, SPUserCollectionFlags ucf, Boolean isSiteAuditor)     at Microsoft.SharePoint.SPUserCollection.GetByIDNoThrow(Int32 id)     at Nintex.Forms.SharePoint.FormControls.PeoplePickerFormControl.<>c.<EditModeDataBinding>b__46_0(SPFieldUserValue u)     at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()     at System.Linq.Buffer`1..ctor(IEnumerable`1 source)     at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)     at Nintex.Forms.SharePoint.FormControls.PeoplePickerFormControl.EditModeDataBinding(String value)     at Nintex.Forms.SharePoint.FormControls.PeoplePickerFormControl.OnFormControlDataBinding(Object sender, EventArgs e)     at System.Web.UI.WebControls.CompositeControl.DataBind()

We are using Nintex Forms v2.11.4.20

We can load the form if we set this field to be render in "display" mode but it seems that in edit mode your code tries to build a SPUser without checking if the user still exists, an exception raises and is never catched.

Can you please provide some help ? Thanks.

0 Kudos