Hello, I need some help:
I made a new OL data overlay in views.
I tried to add different argument filters and (for debugging purpose) a filter that read arguments and runs $this->query->add_where() in the query method of views filter.

I made a page of type "OL maps" and tried to load it with arguments: with my filter the output is the same if I don't use the filter.

I understood that the method query() of my filter runs but $this->query->add_where() doesn't change output. (group setted to 0).
I know this because script cached the arguments and I can read them from DB.

Then to avoid a possible bug inside my script, I tried a simple argument filter as NID and the result is that:
Notice: Undefined variable: empty in include() (line 57 of ./sites/all/modules/views/theme/views-view.tpl.php).

Comments

Admdebian’s picture

I think there is something wrong with this JOIN. It's LEFT JOIN but it should be INNER.
Help?

SELECT node.title AS node_title, node.nid AS nid, node.language AS node_language, node.created AS node_created, 'node' AS field_data_field_geofield_node_entity_type, 'node' AS field_data_body_node_entity_type FROM sc2_node node LEFT JOIN sc2_field_data_field_geofield field_data_field_geofield ON node.nid = field_data_field_geofield.entity_id AND (field_data_field_geofield.entity_type = :views_join_condition_0 AND field_data_field_geofield.deleted = :views_join_condition_1) WHERE (( (field_geofield_lat BETWEEN :db_condition_placeholder_2 AND :db_condition_placeholder_3) AND (field_geofield_lon BETWEEN :db_condition_placeholder_4 AND :db_condition_placeholder_5) )AND(( (node.status = :db_condition_placeholder_6) AND (node.type IN (:db_condition_placeholder_7)) ))) ORDER BY node_created DESC

Admdebian’s picture

Exuse me for the number of comment, but I have new informations:

After any views filter query, the OL module does a new one! This query doesn't change, is the same for each filters configuration. That is the query:

SELECT node.title AS node_title, node.nid AS nid, node.language AS node_language, node.created AS node_created, 'node' AS field_data_field_geofield_node_entity_type, 'node' AS field_data_body_node_entity_type FROM sc2_node node WHERE (( (node.status = :db_condition_placeholder_0) AND (node.type IN (:db_condition_placeholder_1)) )) ORDER BY node_created DESC

Admdebian’s picture

Category: support » bug
Priority: Normal » Major

I found the problem. If I insert OL layer in the map and then I change OL layer filters...the map doesn't work! I tried to clear the cache once, twice ecc... nothing.

I have had to create a new open layer map (NOT A VIEWS) and insert the layer there. There is somenthing wrong in OL cache.

mgifford’s picture

Status: Active » Closed (duplicate)

I'm going to mark this as a duplicate of #1325446: Views OpenLayers generated map is empty

There just seems to be more behind the other issue.