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
Clicking back button after filtering users returns raw json response #9937
Comments
This issue was probably caused by changes in #9408, where it manually pushes to the history stack. |
Our site also experiences this, and it only seems to be the users table for us, not any collection or user groups from what I can see. Before upgrading it worked. So I think Duncan is right about the cause. I will try to downgrade to 4.54 tomorrow and see if it was 4.55 that introduced the bug. |
This is definitely happening since #9408, you can test by setting
Looking at the response when you hit back Chrome is loading the XHR response from it's cache, rather than the HTML page you'd expect: |
Unlike the other listing tables, the user listing page shares the same URL as the JSON endpoint we use to actually get the user info: https://github.com/statamic/cms/blob/4.x/src/Http/Controllers/CP/Users/UsersController.php#L35-L37 I have a feeling the browser is caching the JSON response since it comes after the initial page so that's what you end up looking at when you click "Back". |
Ah yeah, that makes sense. Still, I don't think the XHR response should be cached as a page right? That feels like a Chrome(ium) bug. Unless anyone's seeing the same behaviour in other browsers? |
Ok, looks like it might be a chrome specific issue, but... the fix (untested atm) looks pretty simple: Obligatory SO post: |
Bug description
Ran into this issue while creating a custom filter view for users. If you filter the users table using any method of filtering, then click on any user, and then click the browser back button you get the JSON response (that I imagine feeds the Vue table) instead of the actual page.
How to reproduce
Logs
No response
Environment
Installation
Fresh statamic/statamic site via CLI
Antlers Parser
None
Additional details
I believe this may be due to how history is being manually pushed onto the history stack. I might look into it if I have time.
The text was updated successfully, but these errors were encountered: