-
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
FieldUserRenderer - error on loading Person card (SPHelper -> Cannot read properties of undefined (reading 'getUserById')) #1025
Comments
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible. |
Hello @VladNS90 - thank you for reporting this issue. Thanks! |
Hi @AJIXuMuK. Sorry, my mistake. I used FieldUserRenderer in my Solution. Display form was just an example. Any way it's easy to reproduced with using of FieldUserRenderer. Person card will not load because of missing import in SPHelper class. Suppose this came with migratiob to pnpjs v2. I think it could be easy fix and could help to fix other possible issue with methods in SPHelper. Hope now it's clear. Could this be included in next release of v 2.x.x? |
#1025 -issue with missing PnPJS imports
Fix #1025 - issue with missing imports
Fixed as part of v 3.4.0 |
Category
[x] Bug
Version
Please specify what version of the library you are using: [ 2.9.0 ]
If FieldUserRenderer used for example on a Display form of SharePoint list then Person card fail to load.
Error in console
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'getUserById')
I suppose some import is missing in SPHelper file
If I add
import '@pnp/sp/webs';
then issue will not occur.
Also I noticed that sp.web used in other methods of this file and I think it also broken.
I think this should be fixed at least for versions 2.x.x
Thanks!
The text was updated successfully, but these errors were encountered: