Not compatible with most recent versions of leaflet module: fatal errors in LeafletCountryFormatter

Created on 4 December 2018, almost 6 years ago
Updated 28 March 2024, 8 months ago

I have tested this module with the most recent versions of leaflet module (first with leaflet 8.x-1.0-beta16 and then 8.x-1.0-beta18) and found that it is not compatible: it generates fatal errors in the functions LeafletCountryFormatter::settingsForm() and LeafletCountryFormatter::viewElements(). In debugger I found the following bugs:

1. The line $elements['zoom']['#options'] += array('auto' => 'Auto') in settingsForm(() generates fatal error because there is no $elements['zoom']['#options'] anymore in the $elements array.

2. The call leaflet_render_map() in viewElements() generates fatal error because there is no such function anymore in leaflet module.

3. To show the map properly after fixing the 1. and 2. I had to change the code that gets the zoom parameters from the settings: instead of $settings['zoom'] it has to be $settings["map_position"]["zoom"] and similar ones for minZoom and maxZoom.

I have it functional now after the fixes, so I will create a patch and post it here in the thread.

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States calmforce

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024