Pnp-modern-search: v4.0 List Item result links to preview rather than the page

Created on 25 Jan 2021  路  7Comments  路  Source: microsoft-search/pnp-modern-search

This is similar to the v3.15.3 issue #521 (https://github.com/microsoft-search/pnp-modern-search/issues/521), but for list items

Version used
v4.0

Describe the bug
Results for list items are linked to a preview like https://mytenant.sharepoint.com/sites/somesite/Lists/mylist/3_.000?web=1 rather than the properties. When the link is clicked, a preview is displayed saying the item cannot be shown.

To Reproduce
Steps to reproduce the behavior:

  1. Perform a search with list items in the result
  2. Click on a list item result and you are shown a preview page displaying an error indicating a preview cannot be displayed

Expected behavior
Show the property pane

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):
Chrome and Edge

Additional context
Add any other context about the problem here.

bug

All 7 comments

Hey guys, thank you for the great work by creating and enhancing this incredible project.
This bug is a big one, could you please prioritise it?
Is there any workaround by changing the result template or something similar?
Thank you again!

Hey guys, I did something and it solved the problem.
Looks like the DefaultEncodingURL was been used in the link, but the Path should be used instead.
So, I removed the3 DefaultEncodingURL from the selected properties and now the link is been used as a target.
It's all good for to me now!

Hi @rcanast, thank you for your feedback 馃檹馃徎.

@quarterhorse, does the @rcanast's answer solve your issue?

BTW, the latest version is using the DefaultEncodingURL by default now

Closing this as it's fixed. See #945.

Hey guys, I did something and it solved the problem.
Looks like the DefaultEncodingURL was been used in the link, but the Path should be used instead.
So, I removed the3 DefaultEncodingURL from the selected properties and now the link is been used as a target.
It's all good for to me now!

Hi @rcanast could you explain a little more where you made the changes deleting the DefaultEncodingURL? I'm running the on prem fork for this solution and its older and has the same issue. However as there is not a new version i need to figur eout how to solve this on the on prem version. I did a search all files for DefaultEncodingURL and found it in so many places. However I'm not smart enough to figure out what to delete. Any help would be amazing.

Hey Joel,
In the web part configurations, you can select the properties you'd like to use. So, you need to remove the DefaultEncodingURL property from there, and that's it! From this point, it will use the correct URL and navigate to the content instead of the preview.

Hey Joel,
In the web part configurations, you can select the properties you'd like to use. So, you need to remove the DefaultEncodingURL property from there, and that's it! From this point, it will use the correct URL and navigate to the content instead of the preview.

@rcanast At the risque of sounding like an idiot but you are referring to the actual webpart when working in SharePoint and not when editing in Visual Code i.e. the actual solution files. Now this makes more sense.

OMG OMG OMG OMG It works.. THANK YOU !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Was this page helpful?
0 / 5 - 0 ratings