Skip to content
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

Sort column only updated when GridField is viewed #58

Closed
th3hamm0r opened this issue Sep 1, 2014 · 1 comment
Closed

Sort column only updated when GridField is viewed #58

th3hamm0r opened this issue Sep 1, 2014 · 1 comment

Comments

@th3hamm0r
Copy link

Currently the GridFieldSortableRows::fixSortColumn() method is only called when getManipulatedData() is called, which means only when the grid is displayed.
But if an user creates a new record and gets redirected to the detail view of the created record, the getManipulatedData() method never gets called.
This leaves the sorting in an inconsistent state:
If the site uses caching or things like static publishing, it may happen, that in the time between the creation of a record and the view of its grid representation, the frontend renders the sorted list with the wrong order (because fixSortColumn has not been called until now) and caches this wrong state.

I don't know if there is a clean solution without modifying the SilverStripe core (eg. the GridFieldDetailForm)?

@UndefinedOffset
Copy link
Owner

This is expected behavior, your right the only way would be to poke into one of the extension points in GridFieldDetailForm or modify the core.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants