-
Notifications
You must be signed in to change notification settings - Fork 379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PeoplePicker returns no results with webAbsoluteUrl and ensureUser #1669
Comments
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible. |
Thank you for submitting your first issue to this project. |
Hello @argofgra I replicated the issue. I will be creating a PR on this soon. @joelfmrodrigues or @AJIXuMuK kindly assign this to me. Thanks, |
Hello @argofgra I have created a PR #1693 which will resolve the issue. The solution is as below. SolutionWhen checked, in the method ensureUser, the user object is pushed into By checking if Screenshot with working exampleThanks, |
Hi @argofgra & @NishkalankBezawada, fix has been merged to dev branch, it should be available soon in the next beta release! Thanks to both of you 🙂 |
Category
[ ] Enhancement
[X] Bug
[ ] Question
Version
Please specify what version of the library you are using: [ 3.15.0 ]
Expected / Desired Behavior / Question
When setting webAbsoluteUrl prop to a different site and setting ensureUser = true results are expected to be returned.
Observed Behavior
No results are returned.
If both the webAbsoluteUrl prop is pointing to a different site than the current one, and ensureUser is set to true, no results are returned in the picker. Instead, the console shows the error: PeopleSearchService::searchTenant: error occured while fetching the users.
A deeper error says Cannot read properties of undefined (reading 'push'), which I've tracked down to PeopleSearchService.ensureUser:295. The object cachedLocalUsers assumes it already contains the webAbsoluteUrl as a key but it does not.
Steps to Reproduce
The text was updated successfully, but these errors were encountered: