Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This worked in D6 and briefly in D7, but now it's not working anymore.
I set these filters:
Node: Published Yes
Node: Type = Video
And they work fine.. But when setting a filter for a field type it doesn't work. It doesn't give any results.
Fields: field_ctype = trailer
Doesn't work. It's a Select List.
Comments
Comment #1
dawehnerI tryed it out and it worked fine.
My problem here was the first option didn't saved.
The reason is in fapi
Comment #2
dawehnerSo we might need a workaround which uses "-0" or something like this and change this on a submit handler of the filter.
Comment #3
Cheek CreditAttribution: Cheek commentedAny way for me to get the same result? I'm using node reference as well.
Basically my videos link to films. Now I'm getting the videos with a node reference to this film on the film's page. It working without the field type filter, but not with:
SELECT node.nid AS nid FROM {node} node LEFT JOIN {field_data_field_ctype} field_data_field_ctype ON node.nid = field_data_field_ctype.entity_id AND field_data_field_ctype.etid = 2 LEFT JOIN {field_data_field_cmovieref} field_data_field_cmovieref ON node.nid = field_data_field_cmovieref.entity_id AND field_data_field_cmovieref.etid = 2 WHERE (( (node.status <> 0) AND (field_data_field_ctype.entity_id IN (trailer, other)) AND (field_data_field_cmovieref.field_cmovieref_nid = node) ))
It was working in D6. And in D7 until it was changed. Back then you had to manually set the "Equal to" value.
The option seems to be saved in my view..
Comment #4
dawehnerNodereference is part of cck. I guess they are doing something wrong here.
Comment #5
fgmnodereference and userreference for Drupal 7.x are now maintained separately in the References module: moving issue over there.
Comment #6
fgmNot sure what this bug describes, as it appears to come from Views. Can you provide a scenario to reproduce the bug (steps, expected result, what you saw) ?
Comment #7
fgmCategorizing.
Comment #8
fgmOn node forms at least, filtering by type works normally. I simply do not see where you are applying such a filtering in Views. Also, I notice that the entity system changed since this was submitted, "etid" is now gone.