I'm getting these warnings and notices when displaying a view with an OL map
Notice: Undefined property: views_plugin_query_default::$fields in views_plugin_query_default->query() (line 1183 of /public_html/sites/default/modules/views/plugins/views_plugin_query_default.inc).
Warning: Invalid argument supplied for foreach() in views_plugin_query_default->compile_fields() (line 1101 of /public_html/sites/default/modules/views/plugins/views_plugin_query_default.inc).
Notice: Undefined property: views_plugin_query_default::$fields in views_plugin_query_default->query() (line 1183 of /public_html/sites/default/modules/views/plugins/views_plugin_query_default.inc).
Warning: Invalid argument supplied for foreach() in views_plugin_query_default->query() (line 1185 of /public_html/sites/default/modules/views/plugins/views_plugin_query_default.inc).
Warning: Invalid argument supplied for foreach() in views_plugin_query_default->compile_fields() (line 1101 of /public_html/sites/default/modules/views/plugins/views_plugin_query_default.inc).
Previous patch is already contained in the dev realease.
Thanks a lot for support.
Comments
Comment #1
sokrplare CreditAttribution: sokrplare commentedThis happened for me when Sort Criteria was left empty. It might be a Views thing, but I'm wondering if it isn't OpenLayers' custom plugin expecting a Sort Criteria to exist. The fix is just add Post date back in - which I think is ignored since the data is being fed in from elsewhere, but having dug into the code yet so not sure exactly. Hopefully someone with more in-depth OpenLayers knowledge knows the answer to this and if it is actually a bug.
Comment #2
benjarlett CreditAttribution: benjarlett commentedDitto. I had the same experience as #1... and the same thing fixed it.
Comment #3
alexio2170 CreditAttribution: alexio2170 commentedActually it seems that the theme I was using was causing the warnings, changing the theme cleared the situation.
Hope this helps others.
Comment #4
axgalloway CreditAttribution: axgalloway commentedA views issue, patch found here: http://drupal.org/node/1444272
Comment #5
coredumperror CreditAttribution: coredumperror commentedThe patch linked in #4 does not fix this problem. I tried that patch first, and it fixed some of the errors, but didn't actually fix the map. I was still getting other errors. Adding back the sort criteria was the only thing that worked.
Comment #6
m.stentaA lot of code has changed in Openlayers 7.x-3.x since this was posted, so there's a good chance this is either fixed, or no longer relevant. Please give the latest release a try (7.x-3.0) and reopen if you are still experiencing this issue. :-)