Hello! I am creating an exposed filter by using states from the "Workflow" module. Specifically, I have two workflows, with a bunch of states in each. Only one of the two is associated with the node type I am manipulating in my view.
In order to create a filter that only contains the states that are relevant to my node type, I use "Limit list to selected items" and select only the states of the one workflow I need.
In the resulting popup menu of the exposed filter, however, an additional empty optgroup is generated for the other unwanted workflow, despite the fact that nothing was selected in there. The select looks like:
<select ..> <option ..>Any</option> <optgroup label="good states">
<option>one</option><option>two</option> <option>three</option>
</optgroup> <optgroup label="unwanted"></optgroup></select>
The second optgroup shouldn't be there; it also cannot be hidden in IE, as it doesn't implement "display:none" correctly on optgroup elements.
Thanks!
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | workflow_views_handler_filter_sid.patch | 1.58 KB | freakalis |
Comments
Comment #1
uprojects commentedi have the same problem :(
Comment #2
dawehnerThis is a bug by workflow.
it works fine for a normal module.
Comment #3
freakalis commentedHere is a patch that solves this issue and removes optgroups with no values in them
Comment #4
freakalis commentedForgot to change status
Comment #5
Shadlington commentedPatch failed to apply on 1.5 for some reason so I went ahead and did it manually. Works perfectly!
Comment #6
Bastlynn commentedI would love to see a version of this rolled for D7 to be backported to D6.
Comment #7
Bastlynn commentedThis is a duplicate of #658880: Add selection for 'creation' state and workflow type in "Workflow: current state " filter and that ticket has a patch in consideration, I'm going to close this issue out, work will continue on the other ticket.