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.

CommentFileSizeAuthor
#3 views_ajax_history-3066673-3.patch417 bytesscuba_fly
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

marcvangend created an issue. See original summary.

scuba_fly’s picture

I have the same issue, but only in safari.

scuba_fly’s picture

Version: 8.x-1.2 » 8.x-1.x-dev
FileSize
417 bytes

The 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.

scuba_fly’s picture

Status: Active » Needs review
Coufu’s picture

Amazing patch (#3), thank you scuba_fly

lamp5’s picture

Status: Needs review » Reviewed & tested by the community

Works great. Thx

  • amateescu committed 32d4262 on 8.x-1.x authored by scuba_fly
    Issue #3066673 by scuba_fly, marcvangend: View content does not change...
amateescu’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 8.x-1.x, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.