Pnp-modern-search: Search Results - Unable to set "External Template URL"

Created on 17 Nov 2020  路  17Comments  路  Source: microsoft-search/pnp-modern-search

Version used
3.15.3.0

Describe the bug
When you try to set the External Template URL for Custom Results layout, and you click away (or TAB away) from the text box, the value clears.

If you click somewhere outside the text box (with a valid URL) quickly after pasting in a value, the value remains.

To Reproduce
Configure Search Results web part to return any kind of results.
Sets Results Layout to Custom
Set the "External Template URL" value to a valid URL
Tab to the next control (Edit Result Types), or click anywhere outside the text box
Notice the value disappeared from the External Template URL field

Expected behavior
Value should remain

Screenshots
Screenshot

Desktop (please complete the following information):

  • Chrome (latest)
  • SharePoint Online
bug

Most helpful comment

@jimmywim a new package will be published with this fix a t the end of the month

All 17 comments

This may be a problem with OOTB SharePoint's PropertyPaneTextField and async onGetErrorMessage.

Have raised issue: https://github.com/SharePoint/sp-dev-docs/issues/6479

Hi @jimmywim. Thank you for let us know. As a workaround, try to set your value and immediately save your page. This way, the value should get persisted in the WP property bag.

Hi @FranckyC - scarily, when I try what you suggest, then half the time I get this (it still also clears the value). If I refresh the page it doesn't error like below but does still clear the value.

image

Weird indeed :(. If you try with the v4, does it produce the same behavior?

@FranckyC Check my first comment on this issue, I believe it's an issue affecting OOTB PropertyPaneTextField async validation.

We've started experiencing similar issue, we're currently using version 3.14.2.0

Other observations on the behavior are:

  • If you paste the template URL and quickly click outside before results have a chance of refreshing, the URL will be saved but the results remain blank

  • Editing a page that already had a working template will also also clear the URL just by clicking in and out of the External Template URL field

Unfortunately, v4 has the same problem.

Working on a fix for both versions. Stay tuned.

Should be resolved in develop.

@FranckyC Does this mean it'll be available as an updated v3 release soon?

@jimmywim a new package will be published with this fix a t the end of the month

Great, looking forward to this new version. I got the same issue as jimmywim, great to have the fix in both 3 a 4 versions.

Hi again, just checking if there's any progress in the case or when we should have the fix up n running? Cheers Christian

@Christian-Stahl Seems MSFT are already onto the root cause: https://github.com/SharePoint/sp-dev-docs/issues/6479#issuecomment-736119802

Thanks mr @jimmywim!

@Christian-Stahl new packages for v3 and v4 have been released containing a fix.

@FranckyC v4 with this fix is not released yet. Latest v4 release was 13 November.

Was this page helpful?
0 / 5 - 0 ratings