cancel
Showing results for 
Search instead for 
Did you mean: 
jonathantarabbi
Nintex Newbie

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
Reply
4 Replies
chaddavis
Nintex Newbie

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

Is the People Picker control limited/filtered by a SharePoint group? 

If so, take a look at that group's settings. 

Who can view the members of that group?

I ran into an issue where only the members of the group could view the members, rather than all users being able to view the members. 

If only the members of the group can view the members, then anyone outside of that group will have issues. The problem you're running into may not be exactly the same, but I imagine it's very similar.

0 Kudos
Reply
toms
Nintex Newbie

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

We've just managed to pinpoint this issue as well. Did you find any solutions?

0 Kudos
Reply
landonwenzel
Nintex Newbie

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

I am having the exact same issue as the original poster, and I don't believe it has anything to do with permissions or group settings. This is a generic people-picker, which chooses from all users.

 

The problem lies when removing orphaned/disabled users from the SharePoint site. We recently removed all of these users using ShareGate, and have now started having issues. I believe this happens because the SharePoint site itself no longer has a User record to recall when initializing the Edit Form and thus, throws an error. If I remove the orphaned user from the field via Datasheet/Edit view, the Nintex Edit form magically works again. 

 

If anyone has a workaround for this it would be very appreciated! 

0 Kudos
Reply
Automation Master
Automation Master

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

If you all have Nintex workflow then what about using query user profile action. In that you can capture the error. If error capture is yes, then you can replace the PG field with some System Account or some other user? Make sure you initiate the workflow with highest privileges. If there are too many lists then you can create a site workflow and using web service you can simply trigger the main workflow to make updates in all the fields.

 

Also, if you have ShareGate tool, then it does give you the option of what to do with orphan users. But this works with when you're doing the migration.

0 Kudos
Reply