projectblacklight / blacklight

Blacklight provides a discovery interface for any Solr (http://lucene.apache.org/solr) index.
http://projectblacklight.org/
Other
760 stars 256 forks source link

BL8 Facets "More" redirects to /catalog/facet #3345

Closed ta1986 closed 1 month ago

ta1986 commented 1 month ago

We are upgrading our systems to Blacklight 8 / Bootstrap 5. Facets "More" button works as expected when we first open the page. When we revisit or refresh the same page, "More" buttons redirects to /catalog/facet... instead of opening the flash window.

Here is the video: https://github.com/user-attachments/assets/8092ab1b-fb21-4e3d-a584-b791054ccdc1

jcoyne commented 1 month ago

@ta1986 are there any javascript errors on the page when that happens? I am unable to duplicate this issue on our BL 8. Can you share some reproduction steps on a vanilla install of Blacklight 8?

ta1986 commented 1 month ago

@jcoyne There is no error when I click on the Facets "More" button. I got the following when I click Browser Back button: Blocked script execution in 'about:blank' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.

https://github.com/user-attachments/assets/5b5d6127-daca-4ff1-aa28-29df44606d21

jcoyne commented 1 month ago

Well, not allowing the script would be a possible reason for this behavior. In which browsers are you seeing this behavior in? Are you setting a Content Security Policy (CSP)?

ta1986 commented 1 month ago

Turns out the Google Tag Manager script causes the issue in Blacklight 8 / Bootstrap 5. We used the same GTM script in Blacklight 7 / Bootstrap 4 but did not see that behavior. We will set up new GTM ID and test.

ta1986 commented 1 month ago

We resolved the issue by disabling "Wait for Tags" and "Check Validation" options in Google Tag Manager Click trigger.

jcoyne commented 1 month ago

Wow! That was unexpected. Thanks for reporting back what you found.