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

Filters rendering #2624

Closed
LRPowys opened this issue Dec 5, 2022 · 9 comments
Closed

Filters rendering #2624

LRPowys opened this issue Dec 5, 2022 · 9 comments
Labels
Needs: Triage Needs investigation and repro v4 version 4

Comments

@LRPowys
Copy link

LRPowys commented Dec 5, 2022

Version used
Version 4.8

Describe the bug
Upon selection of values, associated with the first two filters, it hides the rest of the filters. The filters reappear if the browser page is refreshed. The filters are 5 in total and correspond to columns with the same names as created in the document libraries.

To Reproduce
Detailed steps to reproduce the behavior:

  1. Go to the 'Filters' webpart of the PNP Module
  2. Click on the first checkbox to select a value from the first filter. Then click on the next checkbox down to select a value from the second filter. The rest of the filters, visible up to that moment then disappear and it is not possible to further specify the filtering. There are definitively tags on files that are in Level3 filter and above.
  3. Go to browser 'Refresh' at the top or press CTRL+R.
  4. The missing filter(s) reappear and a value within it can now be selected.

Expected behavior
The filters should not hide if there are values associated with files within that particular filter. Constant refreshing of the browser page to prompt the filters to re-appear is not acceptable from user perspective. It used to be the filters were working properly and the fault seems to have started occuring after the upload of some files on the site. The upload may just be a coincidence and may not have anything to do with the issue.

Screenshots

Screenshot 1
image

Screenshot 2
image

Screenshot 3
image

Screenshot 4
image

Screenshot 5
image

Desktop (please complete the following information):

  • Browser: Chrome, Edge

Additional context
The problem started manifesting itself after latest uploads of some few hundred files into some of the document libraries. Up until that moment the filters were working correctly. The SP site contains about 17 000 items in total. Even if the "Query template" box in the 'Search Results' webpart is configured to perform the search in only one of the libraries, one that only has about 3000 items, that does not change the behaviour of the filters. The site has been re-indexed and the separate document libraries too. New page with the same webparts with setting up the options in the filters section from new has been created, however the problem still persists.
The filters correspond to columns, created at a site level, and the files within the document libraries are tagged with different labels. The crawled properties (site columns called Level1 through to Level5) have been mapped to RefinableString properties on SP Admin Center. The filters stopped working correctly regarding both - the initially uploaded files and tags applied and also the recently uploaded files. On a separate note, the whole PNP module appears to be sluggish and barely responsive. Hard reset with clearing the cache of the browser has been done and switch to a different browser attempted as well.

@wobba
Copy link
Collaborator

wobba commented Dec 5, 2022

Can you verify that data is coming back for your repro steps for the Level 3 one?

@wobba wobba added Needs: Triage Needs investigation and repro v4 version 4 labels Dec 5, 2022
@LRPowys
Copy link
Author

LRPowys commented Dec 5, 2022

image

Not entirely clear on the question, but there is definitively tags associated with Level3 in the example above. It is only after the selection of the value in Level2, Level3 dissapears entirely.

@wobba
Copy link
Collaborator

wobba commented Dec 5, 2022

F12 dev tools and network tab. Examine the network response when the search query comes back with JSON data. And compare the request with what is done with the refresh query.

@LRPowys
Copy link
Author

LRPowys commented Dec 5, 2022

Compared as advised. In both cases - pre- and after refreshin I am getting lines of errors as follows:

"- Uncaught (in promise) TypeError: Cannot set properties to null
at...
at...
at...
at...

  • Failed to process execution entry:Error: Cannot perform DeepCopy() because a...js:70 circular reference was encountered, object...
    The resource https://... was preloaded using link preload but not used withing a few seconds from the window's load event. Please make sure it has an appropriate 'as' value and it is preloaded intentionally"

The different, additional line I get after doing a refresh reads:

"Some icons were reregistered. Applications should only call registerIcons modern-search-result.... for any given icon once"

@wobba
Copy link
Collaborator

wobba commented Dec 5, 2022

Not console...look at the json response from the search call in the network tab.

@LRPowys
Copy link
Author

LRPowys commented Dec 6, 2022

Can you verify that data is coming back for your repro steps for the Level 3 one?

It seems data is coming back and it is loading, it just that when the initial selection is made, the filters stop showing on the actual webpage. The first screenshot is from pre-refresh - just after making selection of the first two filters, after which the rest of the filters stop showing on the actual webpage. The second screenshot is from when the page is refreshed when the filters eventually show up.
image
image

@LRPowys
Copy link
Author

LRPowys commented Dec 7, 2022

Not console...look at the json response from the search call in the network tab.

@wobba Does the above make sense? Anything else you would like me to provide? What are the steps in investigating this?

@wobba
Copy link
Collaborator

wobba commented Dec 11, 2022

Having someone who understand looking at network traces per click verify request and response following your steps :) You screenshots don't really help much in terms of understanding so repro is likely needed when someone has the time.

salimbharuchi added a commit to salimbharuchi/pnp-modern-search that referenced this issue Feb 6, 2023
salimbharuchi added a commit to salimbharuchi/pnp-modern-search that referenced this issue Feb 6, 2023
microsoft-search#2624: Bug fix to show current ui filters without page refresh
wobba added a commit that referenced this issue Feb 6, 2023
#2624: Bug fix to unhide disappearing filters without page refresh
@wobba
Copy link
Collaborator

wobba commented Feb 6, 2023

Fixed in the dev branch. Thank you @salimbharuchi

@wobba wobba closed this as completed Feb 6, 2023
salimbharuchi added a commit to salimbharuchi/pnp-modern-search that referenced this issue Aug 7, 2023
…e filter web part

This bug happened due to the regression of microsoft-search#2624
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Triage Needs investigation and repro v4 version 4
Projects
None yet
Development

No branches or pull requests

2 participants