-
poker10 β
committed e17be1be on 7.x-2.x authored by
Paul Lomax β
Issue #1915050 by Paul Lomax, maijs: Geofield Openlayers field formatter...
-
poker10 β
committed e17be1be on 7.x-2.x authored by
Paul Lomax β
- Status changed to Fixed
over 1 year ago 3:14pm 13 May 2023 - πΈπ°Slovakia poker10
Shouldn't this be expanded over all formatter types?
No, because all other formatters fills the
$element
array in foreach cycles, therefore it is populated only if$items
is not an empty array. This one formatter does populate the$element
array directly without the check.See:
case 'geofield_openlayers': $map_name = $display['settings']['map_preset'] ? $display['settings']['map_preset'] : 'geofield_formatter_map'; $element[0] = array('#markup' => _geofield_openlayers_formatter($map_name, $items)); return $element;
vs:
case 'geofield_def_list': foreach ($items as $delta => $item) { $element[$delta] = array('#markup' => _geofield_def_list_formatter($item, $display['settings'])); } return $element;
I think the patch is correct. Committed this, thanks all!
Automatically closed - issue fixed for 2 weeks with no activity.