Closed (fixed)
Project:
Mapstraction
Version:
6.x-2.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 May 2010 at 19:47 UTC
Updated:
10 Jun 2010 at 00:50 UTC
Changes to how Views 3 enforces option_definition() requires an update to the module, else clone and export fail.
class mapstraction_style_map extends views_plugin_style {
function option_definition() {
$options['api'] = array();
$options['width'] = array('default' => 'auto');
$options['height'] = array('default' => '400px');
$options['initial_point']['contains'] = array(
'auto' => array('default' => TRUE),
'latitude' => array('default' => ''),
'longitude' => array('default' => ''),
'zoom' => array('default' => 10),
);
$options['controls'] = array('default' => array());
$options['behaviours'] = array('default' => array());
$options['zoon_control'] = array('default' => array());
$options['default_maptype'] = array('default' => array());
$options['fields'] = array('default' => array());
return $options;
}
See #792184: Invalid argument supplied for foreach() ===> views_plugin_display.inc on line 679. for background. Apparently, this was always preferred by Views 2, but not strictly enforced.
Comments
Comment #1
agentrickardMissed one:
Comment #2
dawehnerJust to clarify. Its not an api change, this api existed since beta5 of views2 or something like this.
Views is just more strict on views3 about this.
This module implemented the api wrong.
Comment #3
agentrickardCorrect. And a fixed definition for fields.
Comment #4
levelos commentedThanks for the updates, applied.