Problem/Motivation
When creating a view with a block display, if you click on the "Allow settings" link within "Block settings", it provides a checkbox for "Items per page". You can check this box, and save the view. Then when loading the view in the UI fresh, that checkbox does not stay checked.
Steps to reproduce:
* Take any View with a block display
* Open the 'Allow settings' dialog
* Uncheck the 'Items per page' checkbox
* Click Apply
* Save the View
* Open the 'Allow settings' dialog
* Check the 'Items per page' checkbox
* Click Apply
* Save the View
* Verify: The Views UI will show that Items per page is enabled (so storing the selected value works as expected)
* Open the 'Allow settings' dialog
* The check box is not checked
Comment | File | Size | Author |
---|---|---|---|
#13 | interdiff_6-13.txt | 1.5 KB | raman.b |
#13 | 3012704-13.patch | 2.32 KB | raman.b |
#13 | 3012704-13-test-only.patch | 1.65 KB | raman.b |
#6 | drupal-8.8.x-views-block-display-allow-checkboxes-default-value-3012704--6.patch | 680 bytes | drclaw |
Comments
Comment #2
quicksketchHere's a patch that solves the problem.
Comment #4
quicksketchSorry that was the wrong patch. I'm still working on this and will upload it when ready.
Comment #5
quicksketchComment #6
drclaw CreditAttribution: drclaw at Fuse Interactive commentedarray_keys()
should do the trick?Comment #8
keesje CreditAttribution: keesje at Media.Monks commentedCould reproduce issue. Patch in #6 applies cleanly on 8.9.x and fixes this issue.
Thanks!
Comment #9
alexpottI've tried to reproduce this on 8.9.x and I can't reproduce the issue.
I installed standard and visited
admin/structure/views/view/who_s_new
and clicked on items per page link and changed it and pressed and then changed it again and everything worked as expected.It'd be great to add a test.
Comment #10
keesje CreditAttribution: keesje at Media.Monks commented@alex thanks. I could only reproduce it with a newly created view, not with an existing one. Maybe should have mentioned that. Will look into test.
Comment #13
raman.b CreditAttribution: raman.b at OpenSense Labs commentedAdding some test coverage to demonstrate the reported bug
Comment #15
LendudeNice, great to see test coverage for this.
Updated the IS with some more extensive steps to reproduce, because it took me some clicking to reproduce it too. But could reproduce it and this fixes the problem.
Comment #19
catchCommitted/pushed to 9.2.x and cherry-picked to 9.1.x, thanks!