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 Not Appearing on Initial Page Load #4011

Closed
lindseyn86 opened this issue Sep 30, 2024 · 5 comments
Closed

PnP Search Results Not Appearing on Initial Page Load #4011

lindseyn86 opened this issue Sep 30, 2024 · 5 comments
Labels
Needs: Author Feedback Awaiting response from the original poster of the issue.

Comments

@lindseyn86
Copy link

lindseyn86 commented Sep 30, 2024

Version used
Ex: 4.13.1 (but also 4.9.13)

Describe the bug
When loading pages that use PnP search results webparts, the search results are not displaying. This happens randomly. The contents of the search results PnP webpart doesn't load. I have attached screenshots from dev tools that show the network and console tabs upon page load when the issue is happening.

To Reproduce
We have been unable to reproduce the issue on a consistent basis. This just happens randomly on page load and we don't actually do anything to produce the issue.

Expected behavior
The PNP Search results appear within the webpart.

Screenshots
Image 1 - search results for events are not displaying
image

Image 2 - Shows a blank webpart, but no console issues:
image

Image 3 - this one shows where it failed to get the html templates, but this isn't always the case when the web part shows blank AND it shows blank on a page without an html template
image

Image 4 - Random localhost request:
image

Image 5 - this request DOES get results when it shows a blank PnP web part
image

Image 6 - screenshot where entire body of page doesn't load, with a bunch of errors from OOTB sp-pages-assembly js:
image

Desktop (please complete the following information):
Google Chrome and Microsoft Edge
Not using a VPN

Additional context
This can only be replicated on the client's laptops.

@kasperbolarsen
Copy link
Collaborator

kasperbolarsen commented Oct 1, 2024

Nothing is as "fun" to debug as inconsistent errors.
One thing I would recommend to fix is the RefinableString00 check. See https://www.techmikael.com/2014/03/s15e01-kql-basics.html , the sample "All restaurants which has a tagged location"
It will not solve the issue but cleaning up the query can't hurt.

Can you test if the user has the same issue in a classic search page or the out of the box Microsoft search box

@wobba
Copy link
Collaborator

wobba commented Oct 2, 2024

Screenshot 5. The last KQL is wrong. You should have no spaced between a property and the value.

RefinableDate >= 2024should be RefinableDate>=2024

Most errors seem to come from other web parts on the page. I see one "uncaught promise" from the search results web part, but impossible to know what this could be from the screenshot.

If you remove all other web parts from the page, do you still get intermittent issues?

Also, if you try to write KQL to ensure RefinableString00 has a value, then it's better to do NOT RefinableString00:* as called out in the documentation at https://learn.microsoft.com/en-us/sharepoint/dev/general-development/keyword-query-language-kql-syntax-reference#filter-on-items-where-a-text-property-is-empty-or-contains-a-value

@kasperbolarsen kasperbolarsen added the Needs: Author Feedback Awaiting response from the original poster of the issue. label Oct 31, 2024
@kasperbolarsen
Copy link
Collaborator

@lindseyn86 any update?

@lindseyn86
Copy link
Author

@lindseyn86 any update?

Tried the RefinableString suggestion and that seemed to do the trick. Although we still have one individual who is experiencing the issue. We think it could be due to some setting either in her browser or on her laptop as everyone else that tested was fine. We are working on troubleshooting with her, but for the most part, it's working. Appreciate your help @kasperbolarsen !

@lindseyn86
Copy link
Author

We are considering the issue resolved as of now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Author Feedback Awaiting response from the original poster of the issue.
Projects
None yet
Development

No branches or pull requests

3 participants