Skip to content
Advertisement

Doctrine Extensions Sortable not working correctly when changing position by more than 1

Im using Symfony 3.1 + Doctrine GEDMO extensions (via StofDoctrineExtensionsBundle). I’ve set my entity to have Sortable behavior:

JavaScript

When i proceed to change position by one the sorting behavior is acting OK:

JavaScript

But when I’ve implemented JS drag&drop to change positions the whole thing gets weird. For example, having this table:

JavaScript

when I do for row with id 6 this:

JavaScript

the table changes to this:

JavaScript

There is nothing for position 1 but position 5 is occupied twice. Any ideas?

Advertisement

Answer

We also discovered this bug a long time ago. In our case there was a problem when you set multiple positions at the same time / flush. We ended up using the complete sort order of javascript without the gedmo extension because single flushes were too expensive.

Also have a look at the following bug issues which could be relevant:

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement