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

Always populate the Sort field in the SiteTree_Blocks table #102

Open
Taitava opened this issue Sep 12, 2016 · 1 comment
Open

Always populate the Sort field in the SiteTree_Blocks table #102

Taitava opened this issue Sep 12, 2016 · 1 comment

Comments

@Taitava
Copy link
Contributor

Taitava commented Sep 12, 2016

For now, the Sort field always has a value of zero unless the user has performed some drag&drop actions. Usually this works good, as new blocks appear after old ones when they are created. However, my database seems to occasionally rearrange the order of how the Block records are stored in the database, which means that my blocks randomly jump around every now and then. The solution is to manually drag&drop them to correct positions, but it could be better if the Sort field would get a correct value at the very beginning :). I know this perhaps does not come up on all environments, so perhaps not everyone has noticed this.

Perhaps I will create a PR for this myself, but for now I will just raise an issue about it, as I don't have time atm to fix this and it's also good to hear opinions about this. Thanks! :)

@thezenmonkey
Copy link

Somehthing like this gist applied to your Block subclass will work for blocks on page. I haven't done it for blocksets yet.

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