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

Updates to Site Pages thumbnails do not get reflected in search results #2893

Closed
erosu-hab opened this issue Apr 5, 2023 · 2 comments
Closed
Assignees
Labels
enhancement New feature or request v4 version 4

Comments

@erosu-hab
Copy link

erosu-hab commented Apr 5, 2023

Version used
4.8

Describe the bug
After the initial setup of a page, any subsequent updates to the thumbnail do not get reflected in search results.

To Reproduce
Detailed steps to reproduce the behavior:

  1. Create a new Site Page, say “News-with-thumbnail.aspx”
  2. Set the header to Plain and set the thumbnail to an image of your choice.
  3. Publish the page.
  4. Create another Site Page, say "Search.aspx"
  5. Add the PnP Search results web part.
  6. Select the SharePoint as data source.
  7. Set query template such that the page created in step 1 gets displayed in the results. For example: Path:https://tenant.sharepoint.com/sites/test/SitePages/News-with-thumbnail.aspx
  8. Select the default Cards display template
  9. Save and publish Search.aspx
  10. News-with-thumbnail.aspx should display the thumbnail set in step 1.
  11. Go to News-with-thumbnail.aspx and set the thumbnail to a different image.
  12. Publish the page.
  13. View Search.aspx page
  14. Search results should display the updated thumbnail. Instead, the old thumbnail gets displayed.
  15. View the OOTB Microsoft search results page.
  16. News-with-thumbnail.aspx shows the correct thumbnail on this page.

Expected behavior
When the thumbnail gets updated for a page, PnP search results displays the newly set thumbnail.

Desktop (please complete the following information):

  • Chrome, Edge

Additional context
The PreviewImageUrl slot is mapped to AutoPreviewImageUrl.
To see the updated thumbnails, I needed to either clear the bowser cache, browse incognito or browse in a different browser.

We’d like our users to see the updated thumbnails, rather than stale content.
Regardless if this is something that can or will be fixed in PnP Modern Search in the future, we'd still like to have an interim solution.
Do you have any suggestions on how to overcome this behaviour? We thought of appending last modified time to PreviewImageUrl, in the display template, to force a cache refresh, but we’re not sure if this would be the correct fix.

Thank you!

@erosu-hab
Copy link
Author

We switched to using PictureThumbnailURL managed property instead of AutoPreviewImageUrl. PictureThumbnailURL seems to be working as expected.

@wobba wobba added enhancement New feature or request v4 version 4 labels Apr 15, 2023
@wobba wobba self-assigned this May 29, 2023
@wobba
Copy link
Collaborator

wobba commented May 29, 2023

Added support to prefer PictureThumbnailURL if present in the data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request v4 version 4
Projects
None yet
Development

No branches or pull requests

2 participants