Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Steps to reproduce:
- Make a view with 6 filters
- Use the and/or rearrange dialog to divide them into 3 groups of 2
- Set the middle group to the OR operation, leave everything else AND
- Save the view
- Open the dialog again
- See the strange appearance of the form (screen-1)
- Apply
- The filters change even though nothing was selected to and it didn't appear that anything would (screen-2)
Comment | File | Size | Author |
---|---|---|---|
#3 | 2110121-filter-group-order.patch | 478 bytes | jtwalters |
| |||
screen-2.png | 79.55 KB | jmuzz | |
screen-1.png | 96.54 KB | jmuzz |
Comments
Comment #1
bunthorne CreditAttribution: bunthorne commentedI had the same problem. I needed the following:
Published = Yes AND
Content Type = X, Y
AND
Date (X) > now OR
Date/Time (Y) > now
But every time I tried to create the second group with the OR inside, Views moved one of the Date fields back into the first group so that it would show:
Published = Yes AND
Content Type = X, Y
Date/Time (Y) > now
AND
Date (X) > now OR
Only after many attempts to fool Views was I able to create the desired grouping. By creating a third group, then saving; then reopening, and seeing a strange set of two groups together without an operator between them--only then could I move the last date item into the second group, save, then reset the operator inside the second group to OR.
I have jQuery Update installed (dev), running PHP 5.4.
Comment #2
bunthorne CreditAttribution: bunthorne commentedI may have discovered a completely different behavior that is causing this problem: When I grab a row to drag-and-drop it into a new group, I cannot seem to "ungrab" the row. If I am in the bottom group and move down to the Apply button, it forgets the change I set. If I move the cursor back up to a higher group (even after I clicked to "drop" it), it still moves the row I grabbed.
Only when I switched to the order-by-weight and group-by-dropdown display was I able to fully control the groups I was trying to set up.
Comment #3
jtwalters CreditAttribution: jtwalters commentedAttached a patch to fix the random re-ordering of filters in the "Rearrange filter criteria" form.
Comment #4
sprucemoose CreditAttribution: sprucemoose commentedThank you jtwalters for updating this old thread with your patch! Worked perfectly for me.
Comment #5
Chris Matthews CreditAttribution: Chris Matthews commentedUnassigning @jtwalters