Import the attached test view. (It has an exposed boolean filter for Content: Published initially set to No, and in the BEF form it's set to display as "Single on/off checkbox".) Observe the checkbox for Published in preview is on when it should be off. Unchecking and clicking Apply doesn't help. Same happens if you add a page display and try it there.
This happens because of the following three things:
value_form
: if (!empty($form_state['exposed']) && !isset($form_state['input'][$identifier])) {
$form_state['input'][$identifier] = $this->value;
}
Add a form element to signal when the form is submitted and calculate the value of the checkbox ourselves based on $_GET. Make sure the code is secure.
Perhaps write a test. I do not feel the need really. The current code mirrors form_type_checkbox_value close enough.
Fixed
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.