Today I tried the module to see if it works as I expected, but unfortunately it didn't. I have a view with an exposed filter. When changing the filter, the view content is changed and the URL is updated with the query parameters. However, when I click the back button, the URL changes back to the previous state but the view content remains unchanged. There was a JS error in the console that may be related:
Uncaught TypeError: Cannot read property 'top' of undefined
at Drupal.AjaxCommands.viewsScrollTop (ajax_view.js?v=8.7.5-dev:132)
at ajax.js?v=8.7.5-dev:435
at Array.forEach (<anonymous>)
at Drupal.Ajax.success (ajax.js?v=8.7.5-dev:433)
at Object.success (ajax.js?v=8.7.5-dev:234)
at i (jquery.min.js?v=3.2.1:2)
at Object.fireWith [as resolveWith] (jquery.min.js?v=3.2.1:2)
at A (jquery.min.js?v=3.2.1:4)
at XMLHttpRequest.<anonymous> (jquery.min.js?v=3.2.1:4)
I tried adding the patch from https://www.drupal.org/project/drupal/issues/2771361#comment-12549585 to resolve the JS error but that didn't help.
I'll take the non-ajax route for now, hopefully this will help improve the module in the long term.
Comment | File | Size | Author |
---|---|---|---|
#3 | views_ajax_history-3066673-3.patch | 417 bytes | scuba_fly |
Comments
Comment #2
scuba_flyI have the same issue, but only in safari.
Comment #3
scuba_flyThe issue with safari seams to be related to back-forward cache:
https://stackoverflow.com/questions/8788802/prevent-safari-loading-from-...
And this patch resolves it for me in safari.
Comment #4
scuba_flyComment #5
Coufu CreditAttribution: Coufu commentedAmazing patch (#3), thank you scuba_fly
Comment #6
lamp5Works great. Thx
Comment #8
amateescu CreditAttribution: amateescu as a volunteer commentedCommitted to 8.x-1.x, thanks!