Adding/removing a bookmark with the checkbox_submit form raises an error when the bookmark counter nav element has not been rendered. This seems to be a previously uncaught javascript error that #3086 has surfaced.
Steps to reproduce:
Prevent the bookmarknav_action from rendering in CatalogController.configure_blacklight block
CatalogController.configure_blacklight do |config|
config.add_nav_action(:bookmark, partial: 'blacklight/nav/bookmark', if: proc { false })
end
Attempt to add a bookmark on search results page using the "Bookmark" checkbox
View alert prompt that says "Unable to save the bookmark at this time."
note: the bookmark is actually saved/destroyed despite the alert
Proposed solution:
In the CheckboxSubmit javascript component, we can verify the bookmark counter exists before incrementing the count.
Adding/removing a bookmark with the
checkbox_submit
form raises an error when the bookmark counter nav element has not been rendered. This seems to be a previously uncaught javascript error that #3086 has surfaced.Steps to reproduce:
bookmark
nav_action
from rendering inCatalogController.configure_blacklight
blockProposed solution:
CheckboxSubmit
javascript component, we can verify the bookmark counter exists before incrementing the count.