refinerycms
refinerycms copied to clipboard
Reorder engines positions
Hello Refinery!
What's going on?
Reordering custom engines in admin pages >= 2 breaks their position orders.
Steps to reproduce
- Create a new rails project with Rails '= 5.1.6' and RefineryCMS '~> 4.0.3'
- Launch the RefineryCMS' fresh installation:
$ rails g refinery:cms --fresh-installation
- Create a new RefineryCMS engine:
$ rails g refinery:engine event title:string
- Go to http://localhost:3000/refinery/events and create 40 events
- Go to http://localhost:3000/refinery/events?page=1, click
Reorder Events
thenDone Reordering Events
- Go to http://localhost:3000/refinery/events?page=2, click
Reorder Events
thenDone Reordering Events
Expected behavior
When returning to http://localhost:3000/refinery/events?page=1, expect the events positions to be the same as before
Actual behavior
When returning to http://localhost:3000/refinery/events?page=1, we can see that the positions have been changed. As a matter of fact, when reordering the positions of the elements on the second page, their position numbers aren't 20..39 anymore but 0..19. Same thing for all the other pages.
System
Rails version: 5.1.6 Ruby version: 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin16] RefineryCMS version: 4.0.3
Thanks in advance.