-
Notifications
You must be signed in to change notification settings - Fork 256
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
Remove Saved Searches feature #1736
Conversation
@cbeer @jcoyne @jkeck Can anyone tell me if the actual tracking was removed from the application or just the UI for saved searches. We're seeing a really huge |
@mark-dce this PR doesn't stop tracking all-together. However; @mbklein submitted #1720 which can probably solve your problem. I don't have a good implementation to point to, but effectively you can configure a crawler detector that could just always return |
I did as suggested in projectblacklight#1736 (comment) to disable search tracking, ie `config.crawler_detector = lambda { |req| true }`, but that resulted in: ``` NameError in CatalogController#index undefined local variable or method `current_user' for #<CatalogController:0x0000000000ceb8> Did you mean? current_or_guest_user Extracted source (around line projectblacklight#76): 74 def agent_is_crawler? 75 crawler_proc = blacklight_config.crawler_detector 76 return false if crawler_proc.nil? || current_user.present? 77 78 crawler_proc.call(request) 79 end Rails.root: /src/blacklightapp Application Trace | Framework Trace | Full Trace blacklight (7.13.2) app/controllers/concerns/blacklight/search_context.rb:76:in `agent_is_crawler?' blacklight (7.13.2) app/controllers/concerns/blacklight/search_context.rb:41:in `find_search_session' blacklight (7.13.2) app/controllers/concerns/blacklight/search_context.rb:32:in `current_search_session' blacklight (7.13.2) app/controllers/concerns/blacklight/search_context.rb:37:in `set_current_search_session' activesupport (6.1.3.2) lib/active_support/callbacks.rb:427:in `block in make_lambda' ``` I've installed blacklight without devise, I have no need for users logging in, yet. The patch seems to fix the issue, it just checks something called `current_user` is defined...
I did as suggested in #1736 (comment) to disable search tracking, ie `config.crawler_detector = lambda { |req| true }`, but that resulted in: ``` NameError in CatalogController#index undefined local variable or method `current_user' for #<CatalogController:0x0000000000ceb8> Did you mean? current_or_guest_user Extracted source (around line #76): 74 def agent_is_crawler? 75 crawler_proc = blacklight_config.crawler_detector 76 return false if crawler_proc.nil? || current_user.present? 77 78 crawler_proc.call(request) 79 end Rails.root: /src/blacklightapp Application Trace | Framework Trace | Full Trace blacklight (7.13.2) app/controllers/concerns/blacklight/search_context.rb:76:in `agent_is_crawler?' blacklight (7.13.2) app/controllers/concerns/blacklight/search_context.rb:41:in `find_search_session' blacklight (7.13.2) app/controllers/concerns/blacklight/search_context.rb:32:in `current_search_session' blacklight (7.13.2) app/controllers/concerns/blacklight/search_context.rb:37:in `set_current_search_session' activesupport (6.1.3.2) lib/active_support/callbacks.rb:427:in `block in make_lambda' ``` I've installed blacklight without devise, I have no need for users logging in, yet. The patch seems to fix the issue, it just checks something called `current_user` is defined...
Removes SaveSearchesController as it is not longer supported. Blacklight::SavedSearched was removed in v7+ Adds storage.yml, a required file to boot up in production. ref: - https://github.com/projectblacklight/blacklight/wiki/Saved-Searches - projectblacklight/blacklight#1736
Removes SaveSearchesController as it is not longer supported. Blacklight::SavedSearched was removed in v7+ Adds storage.yml, a required file to boot up in production. ref: - https://github.com/projectblacklight/blacklight/wiki/Saved-Searches - projectblacklight/blacklight#1736
Fixes #520
The feature was buried in the UX and not more useful than e.g. browser bookmarks since our blacklight search urls are persistent URLs anyway.