1) I've found two syntax errors on latest dev version:
PHP Parse error: syntax error, unexpected '[' in /var/www/vhosts/smart.drautadev.com/httpdocs/sites/all/modules/ip_geoloc/views/ip_geoloc_plugin_style.inc on line 679, referer: http://smart.drautadev.com/admin/structure/views/
PHP Parse error: syntax error, unexpected '[' in /var/www/vhosts/smart.drautadev.com/httpdocs/sites/all/modules/ip_geoloc/views/ip_geoloc_plugin_style.inc on line 716, referer: http://smart.drautadev.com/admin/structure/views/
You have an instruction like this:
if ($aggregation_field) {
$location->aggregation_value = ip_geoloc_get_view_result($views_plugin_style, $aggregation_field, $i)[0];
}
Should be splitted into two:
if ($aggregation_field) {
$view_result = ip_geoloc_get_view_result($views_plugin_style, $aggregation_field, $i);
$location->aggregation_value = $view_result[0];
}
2) Also, If I enable and configure Cluster aggregation this error shows up:
PHP Fatal error: Call to a member function get_value() on a non-object in sites/all/modules/contrib/views/plugins/views_plugin_style.inc on line 565
Final note: I'm running PHP 5.3.
Comments
Comment #1
rcodinaComment #2
rcodinaComment #3
rcodinaComment #4
rcodinaComment #5
rcodinaThe patch I enclose only fixes first error.
Comment #6
rdeboerOuch!
Thanks for this -- that's the price you pay for being at the bleeding edge, Roger! :-)
"Final note: I'm running PHP 5.3"... Ah, yes... I'm running PHP 5.4... So that explains the first error.
I will be investigating the 2nd error. Maybe don't configure the "Cluster Aggregation" then, for now.
Rik
Comment #7
rcodinaThanks Rik,
One more thing. we found out that marker differentiator may be broken too. Could you please check it?
Thanks!
Comment #8
rdeboerIn what way is the differentiator broken?
What kind of error do you get?
Rik
Comment #9
rcodinaAll markers get same color (I get this error using all latest dev version of all leaflet modules and latest dev module of this one)
Comment #10
rcodinaHi Rik,
Forget about the marker differentiator. It works like a charm. It was my fault on views configuration.
Thanks!
Comment #11
rcodinaBoth errors solved. The second error was due to selecting a non numeric field. So we must avoid the user to select that fields:
a) I first tried this approach (best option):
But after first validation error on that field, ajax breaks:
PHP Fatal error: Call to a member function options_validate() on a non-object in /var/www/vhosts/dev.eu-smartcities.eu/httpdocs/sites/all/modules/contrib/views/includes/admin.inc on line 3301, referer: http://dev.eu-smartcities.eu/admin/structure/views/view/map_home_leaflet_search/editb) So I finally did this:
Comment #14
rdeboerThe patch I checked in, is slightly different from the original and seems to work fine. It issues a warning rather than a form error because not every Views field is a Field API field, so it cannot determine with 100% certainty if a selected aggregation field is numeric or not.
Comment #15
rcodinaOk Rik, thank you!