Skip to content
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

PnP Search Results Webpart giving Error upon first load #3601

Closed
Animoticons opened this issue Mar 6, 2024 · 3 comments
Closed

PnP Search Results Webpart giving Error upon first load #3601

Animoticons opened this issue Mar 6, 2024 · 3 comments

Comments

@Animoticons
Copy link

Version used
4.10.2

Describe the bug

Hello everyone

First of all thanks for developing this Webpart. Without this, we wouldn't be able to implement a good people search feature to our SharePoint Site.

Unfortunately we are running into an issue that appears consistently upon first load of the Webpart in Edge, Firefox and Chrome. For example if i restart the browser and open the Webpart or when i "Empty Cache and Hard Reload" the following Error appears:

Something went wrong
If the problem persists, contact the site administrator and give them the information in Technical Details.

ERROR:
e is undefined

CALL STACK:
8194/M</e.prototype.loadComponent@https://res-1.cdn.office.net/files/sp-client/sp-pages-assembly_en-us_cf26de8e2e7876cb8566c097efcc0c05.js:191:3417
8194/M</e.prototype.loadComponentById/<@https://res-1.cdn.office.net/files/sp-client/sp-pages-assembly_en-us_cf26de8e2e7876cb8566c097efcc0c05.js:191:4057

This issue appears not with any other WebParts.

To Reproduce
Detailed steps to reproduce the behavior:

  1. Add WebParts "PnP - Search Box", "PnP - Search Results" and "PnP - Search Filters" to a SharePoint Page.
  2. Import configurations (See attachments)
    webpartproperties_Box_15_02_24.json
    webpartproperties_Filter_15_02_24.json
    webpartproperties_Results_15_02_24.json
  3. Publish the Page.
  4. Close the Browser and reopen the Browser. Upon first load, the error appears.
  5. You can also "Empty Cache and Hard Reload" to trigger the issue.
  6. Upon page reload, the error disappears and the People Search Results appear correctly.

Expected behavior
The Error does not appear and the people search results show on first attempt.

Screenshots
image

Desktop (please complete the following information):

  • Browser: Edge, Firefox, Chrome

Additional context
The issue has existed since we use PnP Modern Search. I updated the Webpart to the latest Version, but the issue persists.

@patrikhellgren
Copy link
Contributor

From what you describe I can only guess that it has something to do with Microsoft Graph Toolkit and the issues that has been around this historically. You don't mention from what version you have seen this and what the rest of the configuration in SharePoint looks like but I would say you have run into something like the issue mentioned in #3505.
Lots of issues regarding PnP Modern Search and Microsoft Graph Toolkit (which is used by for example the people layout) will hopefully be resolved in version 4.11 of PnP Modern Search in which MGT has been updated to version 4. Looks like version 4.11 will be released shortly #3597.

@wobba
Copy link
Collaborator

wobba commented Mar 6, 2024

You can test 4.11 pre-release to see if it solves your issue https://github.com/microsoft-search/pnp-modern-search/releases/tag/4.11.0

@Animoticons
Copy link
Author

Hi Wobba
Yes, 4.11 seems to have solved the issue for me, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants