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)

Comments

asimmonds’s picture

Status: Active » Needs review
StatusFileSize
new1.95 KB

Seeing if this test fails on the testbot

Status: Needs review » Needs work

The last submitted patch, 674626_test_only.patch, failed testing.

asimmonds’s picture

Status: Needs work » Needs review
StatusFileSize
new2.58 KB

Patch 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.

aspilicious’s picture

It 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

zhangx1a0’s picture

Good patch, I also found this bug but my patch is worse (I ordered $rows in theme function :p).

damien tournoud’s picture

Status: Needs review » Reviewed & tested by the community

Looks very good, thanks for the test.

sun’s picture

Good job, thanks!

dries’s picture

Status: Reviewed & tested by the community » Fixed

Great, committed to CVS HEAD.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.