The order of the filter list on a text format configuration page (ie admin/config/content/formats/2) is not ordered correctly by weight.
If you rearrange the filters and save, then they are displayed again in the original order. The weights are updated and stored correctly in the database.
If javascript is disabled, then you can see the weights are not ordered in sequence (screenshot attached)
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 674626.patch | 2.58 KB | asimmonds |
| #1 | 674626_test_only.patch | 1.95 KB | asimmonds |
| filter_weights_with_js_disabled.png | 6.45 KB | asimmonds |
Comments
Comment #1
asimmonds commentedSeeing if this test fails on the testbot
Comment #3
asimmonds commentedPatch adds the filter weight to each row in the form, and the test uses a xpath construct to verify the order is correct before and after filter reordering.
Comment #4
aspilicious commentedIt worked fine for me, and to please the people adding stuff to head, my test report:
1) I installed noscript (ff)
2) I went to the page that didn't update the order of the items
3) I moved the items around and saved it, it seemed to be OK
4) I disabled javascript, changed the weight of the items, saved, everything is updated correctly
So, "it works" and it has tests.
If someone can review the "code" then maybe we can make this RTBC
Comment #5
zhangx1a0 commentedGood patch, I also found this bug but my patch is worse (I ordered $rows in theme function :p).
Comment #6
damien tournoud commentedLooks very good, thanks for the test.
Comment #7
sunGood job, thanks!
Comment #8
dries commentedGreat, committed to CVS HEAD.