For example: on a Page display add filter Node: Published (or Node: Sticky), expose it, don't select a default value (Yes/No) i.e. leave the radios unchecked, select the Optional checkbox, hit the Update button, save the View.

Interestingly the Edit View screen shows the default value of the filter as "No". And this is what gets used when you visit the page display. However the exposed filter dropdown says "Any" .. so if you just hit the Apply button without changing anything you will probably get a different set of results.

Suggested way forward: when editing a filter's settings, if the admin has not defined the default value of the filter then use the default that will actually be used in practise. And when the Optional box is checked, an additional default filter value of Any should be available. By not selecting either Yes or No I thought that was what I was essentially doing, but I was wrong!

Although I've marked this as affecting the "node data" component, it is probably more to do with the generic views_handler_filter_boolean_operator.

Comments

sean.mtm’s picture

Version: 6.x-2.3 » 6.x-2.5

Updating issue - still exists in 6.x-2.5

esmerel’s picture

Status: Active » Closed (works as designed)

The filter doesn't fire if there's no default value. I tried this out and node:published always defaults to 'no'. This is on purpose. A filter that 'should be used in practice' is what the admin should set as the default value.

esmerel’s picture

Status: Closed (works as designed) » Closed (duplicate)

After some further discussion, this behavior may get changed with http://drupal.org/node/347892

gpk’s picture