-
Notifications
You must be signed in to change notification settings - Fork 27
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
Bug - bookmark toggle throws js error #769
Comments
I can't seem to reproduce this error. |
I think this may be a turbolinks issue. If you go from the home page, click on collections, and try to bookmark, then unbookmark a record, you get an error. If you refresh that same page and bookmark/unbookmark the error does not occur. |
thanks @jkeck I'll check again |
now I see it thanks @jkeck ! |
A first approach was to remove |
Looks like this issue is specific to Rails 5.2 and was reported here as a Blacklight issue: More info here on Penn State's Blacklight code repo: |
So... we can disable forgery protection on the bookmark checkboxes, or we can figure out a fix to the problem, which is probably that the csrf token on the bookmark form is not updated when we submit the form and get a response from the server. Either way the core issue is with code that is present in Blacklight. |
Try it on the Bookmarks page. I'm seeing it happen there. We are seeing these things intermittent in odd places. |
Okay, I see it on the Arclight bookmarks page, but curiously I can't see it on the http://demo.projectblacklight.org/. Where is the source for the arclight-demo? |
Arclight-Demo here: https://github.com/sul-dlss/arclight-demo Arclight codebase: https://github.com/projectblacklight/arclight |
One difference I notice between the arclight and the blacklight demo site is that the latter is always submitting the request with an X-CSRF-Token header that matches the meta tag. |
Resolving this issue as part of a review of |
On the bookmark toggle checkbox, you are able to check/uncheck each bookmark box once. When you click a second time, a JS alert appears with an error. Reloading the page allows you to check/uncheck again, but only once for each checkbox.
The text was updated successfully, but these errors were encountered: