2

I'm using Drupal 7.15 to implement an music event site which allows users to search for events in their area and return a list of those events along with the associated venue and distance.

I have 2 content types, Venue and Event where the Event type uses an Entity Reference field to reference the Venue where the event is being held. The Venue type has an Addressfield which is geocoded by the Geofield module.

I have had no problem creating a View of just Venues which uses an exposed Openlayers Proximity filter to display a list of venues with their distances relative to the location criteria entered into the filter. I can enter in a starting location and get back a view of results that shows the distance relative to my starting point.

What I would like to do is to create a view of Event content types that pulls in associated Venues using an Entity Reference relationship to the Venue. I created the view and added a relationship of Entity Reference:Referenced Entity to the venue reference field. I then added fields to the view for venue address, geofield and proximity distance and selected the reference in the Relationship field for each of these.

By default, all event results are displayed when I first view the page and don't enter anything into the exposed proximity filter. I can see all of my data including the Venue fields being brought in by the relationship. The problem is that when I specify a location in the proximity filter I get no results back.

I had this same functionality working in a Drupal 6 site. There is an issue on Drupal.org http://drupal.org/node/979186 for Drupal 6 that included a simple patch to the openlayers_proximity_handler_filter_circle.inc file that I implemented some time back on my D6 site and there is mention in the issue that D7 still has a problem. I thought that I might try updating the same file on my D7 site but it did not work and ended up giving the error:

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'node_field_data_field_event_venue_ref__openlayers_proximity_filter_circle.distance' in 'where clause'

I reverted the code back to get rid of the error but I just can't seem to find what I need to do to get this working. Can anyone lend a hand and point me in the right direction? I'm assuming this is an issue with the Openlayers Proximity filter since all my data including the referenced data is displayed until I use the filter.

Thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.