In the default Calendar view (calendar module), a filter is one of nodetypes: array('article', 'page') is set.
In a standard Drupal installation this results in an admin summary "Node: Type in article, page".
However, if one of the nodetypes or both don't exist in the Drupal installation, the admin summary is expected to reflect that. Instead it shows "Node: Type in article," (expected: "Node: Type = article") or "Node: Type in , page" (expected: "Node: Type = page") or just "Node: Type in" (expected: "Node: Type = Unknown"). Only after manually reconfiguring the filter the status is reflected.
This is surely not wanted. In views_handler_filter_in_operator::admin_summary(), it is checked only for single options if they are applicable. For multiple options this is taken for granted.
Enclosed is a patch that fixes this and makes sure, that in any case only valid options are displayed. I needed to rewrite the whole function - the result is not a single line longer and quite as efficient as it was.
The patch has been tested by myself, but should probably get some more testing.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | views_handler_filter_in_operator.patch | 1.53 KB | dawehner |
| views_handler_filter_in_operator.patch | 1.97 KB | pancho |
Comments
Comment #1
merlinofchaos commentedWow, on the list of patches that fell through the cracks. Sorry. Can I get a reroll? This doesn't apply, and it looks valuable.
Comment #2
merlinofchaos commentedComment #3
dawehnerThis patch is a total different approach to the problem.
It scannes first to every value and looks whether the value is still valid. Then choose different output for 0, single, multiple values
I used this tree views to test... They could be used for a simpletest
Comment #4
merlinofchaos commentedCommitted to all branches.