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)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bunthorne’s picture

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

bunthorne’s picture

Issue summary: View changes

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

jtwalters’s picture

Assigned: Unassigned » jtwalters
Status: Active » Needs review
FileSize
478 bytes

Attached a patch to fix the random re-ordering of filters in the "Rearrange filter criteria" form.

sprucemoose’s picture

Thank you jtwalters for updating this old thread with your patch! Worked perfectly for me.

Chris Matthews’s picture

Assigned: jtwalters » Unassigned

Unassigning @jtwalters