Skip to content

Commit

Permalink
[#4566] Display debug output on the record screen
Browse files Browse the repository at this point in the history
The render of the 'SearchContext::ServerItemPaginationComponent' that includes the Previous and Next links does not happen because one of the conditions (@search_session['document_id'] == @current_document_id) in the
https://github.com/projectblacklight/blacklight/blob/1494bd0884efe7a48623e9b37abe558fa6348e2a/app/components/blacklight/search_context/server_item_pagination_component.rb#L14
method returns false.
the search_session is not updated with the current document.id
  • Loading branch information
christinach committed Nov 15, 2024
1 parent 7725905 commit 3f97eea
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 73 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ gem 'alma'
gem 'babel-transpiler'
gem 'bcrypt_pbkdf'
# Blacklight
gem 'blacklight', '~> 8.6.1'
gem 'blacklight', '~> 8.6'
gem 'blacklight_dynamic_sitemap'
gem 'blacklight-hierarchy'
gem 'blacklight-marc', '~>8.1'
Expand Down
144 changes: 74 additions & 70 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,79 +8,82 @@ GIT
GEM
remote: https://rubygems.org/
specs:
actioncable (7.1.4.1)
actionpack (= 7.1.4.1)
activesupport (= 7.1.4.1)
actioncable (7.1.5)
actionpack (= 7.1.5)
activesupport (= 7.1.5)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
zeitwerk (~> 2.6)
actionmailbox (7.1.4.1)
actionpack (= 7.1.4.1)
activejob (= 7.1.4.1)
activerecord (= 7.1.4.1)
activestorage (= 7.1.4.1)
activesupport (= 7.1.4.1)
actionmailbox (7.1.5)
actionpack (= 7.1.5)
activejob (= 7.1.5)
activerecord (= 7.1.5)
activestorage (= 7.1.5)
activesupport (= 7.1.5)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.1.4.1)
actionpack (= 7.1.4.1)
actionview (= 7.1.4.1)
activejob (= 7.1.4.1)
activesupport (= 7.1.4.1)
actionmailer (7.1.5)
actionpack (= 7.1.5)
actionview (= 7.1.5)
activejob (= 7.1.5)
activesupport (= 7.1.5)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.2)
actionpack (7.1.4.1)
actionview (= 7.1.4.1)
activesupport (= 7.1.4.1)
actionpack (7.1.5)
actionview (= 7.1.5)
activesupport (= 7.1.5)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
actiontext (7.1.4.1)
actionpack (= 7.1.4.1)
activerecord (= 7.1.4.1)
activestorage (= 7.1.4.1)
activesupport (= 7.1.4.1)
actiontext (7.1.5)
actionpack (= 7.1.5)
activerecord (= 7.1.5)
activestorage (= 7.1.5)
activesupport (= 7.1.5)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.1.4.1)
activesupport (= 7.1.4.1)
actionview (7.1.5)
activesupport (= 7.1.5)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
activejob (7.1.4.1)
activesupport (= 7.1.4.1)
activejob (7.1.5)
activesupport (= 7.1.5)
globalid (>= 0.3.6)
activemodel (7.1.4.1)
activesupport (= 7.1.4.1)
activerecord (7.1.4.1)
activemodel (= 7.1.4.1)
activesupport (= 7.1.4.1)
activemodel (7.1.5)
activesupport (= 7.1.5)
activerecord (7.1.5)
activemodel (= 7.1.5)
activesupport (= 7.1.5)
timeout (>= 0.4.0)
activestorage (7.1.4.1)
actionpack (= 7.1.4.1)
activejob (= 7.1.4.1)
activerecord (= 7.1.4.1)
activesupport (= 7.1.4.1)
activestorage (7.1.5)
actionpack (= 7.1.5)
activejob (= 7.1.5)
activerecord (= 7.1.5)
activesupport (= 7.1.5)
marcel (~> 1.0)
activesupport (7.1.4.1)
activesupport (7.1.5)
base64
benchmark (>= 0.3)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
logger (>= 1.4.2)
minitest (>= 5.1)
mutex_m
securerandom (>= 0.3)
tzinfo (~> 2.0)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
Expand Down Expand Up @@ -210,7 +213,7 @@ GEM
libdatadog (~> 11.0.0.1.0)
libddwaf (~> 1.14.0.0.0)
msgpack
date (3.3.4)
date (3.4.0)
debase-ruby_core_source (3.3.1)
deprecation (1.1.0)
activesupport
Expand Down Expand Up @@ -289,6 +292,8 @@ GEM
faraday-net_http (3.3.0)
net-http
ffi (1.17.0)
ffi (1.17.0-aarch64-linux-gnu)
ffi (1.17.0-x86_64-linux-gnu)
ffi-compiler (1.3.2)
ffi (>= 1.15.5)
rake
Expand Down Expand Up @@ -325,11 +330,11 @@ GEM
concurrent-ruby (~> 1.0)
ice_nine (0.11.2)
io-console (0.7.2)
irb (1.14.0)
irb (1.14.1)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
jaro_winkler (1.6.0)
jbuilder (2.12.0)
jbuilder (2.13.0)
actionview (>= 5.0.0)
activesupport (>= 5.0.0)
jquery-datatables (1.10.20)
Expand Down Expand Up @@ -376,7 +381,7 @@ GEM
railties (>= 4)
request_store (~> 1.0)
logstash-event (1.2.02)
loofah (2.22.0)
loofah (2.23.1)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
mail (2.8.1)
Expand All @@ -395,7 +400,7 @@ GEM
memory_profiler (1.0.2)
method_source (1.1.0)
mini_mime (1.1.5)
mini_portile2 (2.8.7)
mini_portile2 (2.8.8)
minitest (5.25.1)
msgpack (1.7.3)
multi_xml (0.6.0)
Expand All @@ -404,7 +409,7 @@ GEM
racc (~> 1.7)
net-http (0.4.1)
uri
net-imap (0.4.15)
net-imap (0.5.1)
date
net-protocol
net-ldap (0.19.0)
Expand All @@ -419,7 +424,7 @@ GEM
net-smtp (0.5.0)
net-protocol
net-ssh (7.2.3)
nio4r (2.7.3)
nio4r (2.7.4)
nokogiri (1.16.7)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
Expand All @@ -443,7 +448,7 @@ GEM
marc
scrub_rb (~> 1.0)
orm_adapter (0.5.0)
ostruct (0.6.0)
ostruct (0.6.1)
parallel (1.26.3)
parser (3.3.4.2)
ast (~> 2.4.1)
Expand All @@ -456,7 +461,7 @@ GEM
pry-byebug (3.10.1)
byebug (~> 11.0)
pry (>= 0.13, < 0.15)
psych (5.1.2)
psych (5.2.0)
stringio
public_suffix (6.0.1)
puma (6.4.3)
Expand All @@ -476,23 +481,22 @@ GEM
rack (>= 3.0.0)
rack-test (2.1.0)
rack (>= 1.3)
rackup (2.1.0)
rackup (2.2.1)
rack (>= 3)
webrick (~> 1.8)
rails (7.1.4.1)
actioncable (= 7.1.4.1)
actionmailbox (= 7.1.4.1)
actionmailer (= 7.1.4.1)
actionpack (= 7.1.4.1)
actiontext (= 7.1.4.1)
actionview (= 7.1.4.1)
activejob (= 7.1.4.1)
activemodel (= 7.1.4.1)
activerecord (= 7.1.4.1)
activestorage (= 7.1.4.1)
activesupport (= 7.1.4.1)
rails (7.1.5)
actioncable (= 7.1.5)
actionmailbox (= 7.1.5)
actionmailer (= 7.1.5)
actionpack (= 7.1.5)
actiontext (= 7.1.5)
actionview (= 7.1.5)
activejob (= 7.1.5)
activemodel (= 7.1.5)
activerecord (= 7.1.5)
activestorage (= 7.1.5)
activesupport (= 7.1.5)
bundler (>= 1.15.0)
railties (= 7.1.4.1)
railties (= 7.1.5)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
actionview (>= 5.0.1.rc1)
Expand All @@ -504,9 +508,9 @@ GEM
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
railties (7.1.4.1)
actionpack (= 7.1.4.1)
activesupport (= 7.1.4.1)
railties (7.1.5)
actionpack (= 7.1.5)
activesupport (= 7.1.5)
irb
rackup (>= 1.0.0)
rake (>= 12.2)
Expand All @@ -528,7 +532,7 @@ GEM
rainbow (>= 2.0, < 4.0)
rexml (~> 3.1)
regexp_parser (2.9.2)
reline (0.5.9)
reline (0.5.11)
io-console (~> 0.5)
request_store (1.7.0)
rack (>= 1.4)
Expand Down Expand Up @@ -598,6 +602,7 @@ GEM
sprockets-rails
tilt
scrub_rb (1.0.1)
securerandom (0.3.2)
selenium-webdriver (4.24.0)
base64 (~> 0.2)
logger (~> 1.4)
Expand Down Expand Up @@ -662,19 +667,19 @@ GEM
net-ssh (>= 2.8.0)
stackprof (0.2.26)
string_rtl (0.1.0)
stringio (3.1.1)
stringio (3.1.2)
sync (0.5.0)
term-ansicolor (1.11.2)
tins (~> 1.0)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
terser (1.2.3)
execjs (>= 0.3.0, < 3)
thor (1.3.1)
thor (1.3.2)
thread_safe (0.3.6)
tilt (2.4.0)
timecop (0.9.10)
timeout (0.4.1)
timeout (0.4.2)
tins (1.33.0)
bigdecimal
sync
Expand Down Expand Up @@ -719,7 +724,6 @@ GEM
addressable (>= 2.8.0)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
webrick (1.8.2)
websocket (1.2.11)
websocket-driver (0.7.6)
websocket-extensions (>= 0.1.0)
Expand All @@ -746,7 +750,7 @@ DEPENDENCIES
axe-core-rspec
babel-transpiler
bcrypt_pbkdf
blacklight (~> 8.6.1)
blacklight (~> 8.6)
blacklight-hierarchy
blacklight-marc (~> 8.1)
blacklight_dynamic_sitemap
Expand Down
11 changes: 9 additions & 2 deletions app/views/catalog/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,17 @@
<div class="col-xs-12 px-4">
<div class="button--start-over">
<%= render_start_over_link(root_path) %>
</div>
</div></br>
<% if @search_context %>
blacklight_config.track_search_session.storage: <%= blacklight_config.track_search_session.storage %></br>
Prev_ID: <%= @search_context[:prev]["id"] if @search_context[:prev] %></br>
Next_ID: <%= @search_context[:next]["id"] if @search_context[:next] %></br>
Document_ID: <%= @document.id %></br>
SearchSession_ID: <%= search_session["document_id"] %></br>
Document_ID == SearchSession_ID: <%= @document.id == search_session["document_id"] %></br>
<%= link_back_to_catalog_safe class: 'btn btn-default button--back-to-search', label: t('blacklight.back_to_search').html_safe %>
<%= render 'previous_next_doc' %>
<%= render(Orangelight::SearchContext::ServerItemPaginationComponent.new(search_context: @search_context, search_session: search_session, current_document: @document)) %>
<% end %>
</div>
<%= render 'show_tools' %>
Expand Down

0 comments on commit 3f97eea

Please sign in to comment.