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

dawehner’s picture

I tryed it out and it worked fine.
My problem here was the first option didn't saved.

The reason is in fapi

The #options array can not have a 0 key, as it would not be possible to discern checked and unchecked states.
dawehner’s picture

So we might need a workaround which uses "-0" or something like this and change this on a submit handler of the filter.

Cheek’s picture

Any 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..

dawehner’s picture

Project: Views (for Drupal 7) » Content Construction Kit (CCK)
Version: 7.x-3.x-dev » 7.x-2.x-dev
Component: Views Data » nodereference.module

Nodereference is part of cck. I guess they are doing something wrong here.

fgm’s picture

Project: Content Construction Kit (CCK) » References
Version: 7.x-2.x-dev » 7.x-1.x-dev
Component: nodereference.module » Code

nodereference and userreference for Drupal 7.x are now maintained separately in the References module: moving issue over there.

fgm’s picture

Status: Active » Postponed (maintainer needs more info)

Not 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) ?

fgm’s picture

Component: Code » Code: node_reference

Categorizing.

fgm’s picture

On 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.