Hello..i cant seem to filter elements of an address field with views2...im trying to return content by state(province) field and ive added both the province field as a argument and as a filter, but all the results always return!

please help!

thanks
r

CommentFileSizeAuthor
#5 views_filters-793790-5.patch657 bytesLendude
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rbl’s picture

Same here!

secretwep’s picture

Yep, the sub-fields (or whatever the term may be for elements inside the address field) are not exposed. Since I have yet to figure out how to filter or sort on elements of the address, the usefulness of the module has plummeted for me.

alexidze’s picture

same here!
when filtering by Country the WHERE clause in the query looks like this

WHERE (node_data_field_dd.field_dd_is_primary = 0) ??

same when using arguments

P.S. "dd" is the name of the address field

ezk1984’s picture

Me too, the where clause in the SQL query is using the is_primary sub-field instead whatever sub-field we would like to filter on.

Lendude’s picture

Version: 6.x-1.08 » 6.x-1.12
FileSize
657 bytes

The issue I ran into was similair. I could add a filter for a specific address field but the filter would always show 'field_xxxxx=0' in the query when I searched for something.

The problem is that als the sub-field views filter handlers are set to 'content_handler_filter_integer'. So you could only search for integers (not very useful). I added a patch that changes all the handlers for the the non-is_primairy fields to 'content_handler_filter_string'. This will make these fields searchable, like you would expect.

Len