> FYI for anyone that had issues with the csrf_...
# support
k
FYI for anyone that had issues with the csrf_token, this fix sorted it for me. I think the require jquery_ujs doesn’t work for some reason, might be our use of
jsbundling-rails
but perhaps someone else would know
Hi again everyone, finding this unfortunately doesn’t work on prod. Anybody familiar with our setup would be really helpful. Thanks
e
you have any additional details on how it is breaking in prod?
k
Once you finish in the PayPal window and it closes automatically, it tries to submit the page, then that error appears
We are using js-bundling with Turbo for app.js but have put all Spree stuff into a separate file
Copy code
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
    <%= javascript_include_tag "application", "data-turbo-track": "reload", defer: true %>
    <%= javascript_include_tag "spree/frontend/all" %>
Thanks for your help
e
🤔 my only suggestion right now would be to dig into the network tab of the browser dev tools and try to understand what request is missing the token and who’s responsible for triggering it, with that info we can find a way to add the token and avoid the error
k
Thanks
e
anytime, too bad I can’t help more 👍
❤️ 1
k
We messed up opting for the JS-bundling stuff but we’d got it right for all other projects on Rails 6 so figured it’d be fine. New learning lessons for sure. We’ll get there 🙂
💪 1