The EFQ label field is a field that returns the entity label independent of the entity type. For the node it is the name property, for instance.
The key of the filter is label. So when relation_select_plugin_style.inc invokes $this->display->handler->get_handlers('filter');, there is a key label in the array. However, the form item that is added for this exposed filter is keyed by title. The right key to use is $filter->options['expose']['identifier'], because this is the one used by views in views_handler_filter::exposed_form(). I guess this value is usually equal to the key in the result of get_handlers('filter') but of course, when I use it, it isn't :).
If you need a patch file, let me know, but it is a small change on line 34 of relation_select_plugin_style.inc:
$lookup_options[$filter->options['expose']['identifier']] = $filter->options['expose']['label'];
Also, you can change $filter->options['expose']['label'] to $filter->ui_name() to get a label that includes the relation. When there are two filters on the same field, but on different tables, then the user will be able to distinguish between them.
So the line becomes:
$lookup_options[$filter->options['expose']['identifier']] = $filter->ui_name();
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | relation_select-lookup-on-change-1827104-3.patch | 1.15 KB | Jorrit |
Comments
Comment #1
Jorrit commentedSteps to reproduce:
The same goes for the Entity: Bundle property.
Comment #2
Jorrit commentedDo you need anything to proceed on this issue? I think it is a simple change.
Comment #3
Jorrit commented