Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
With drupal 8.3.0-alpha1 'Leaflet map' views style option window displays:
Please add at least one geofield to the view.
If disable condition in line 174 of /leaflet_views/src/Plugin/views/style/LeafletMap.php:
if (is_a($handler, '\Drupal\views\Plugin\views\field\Field')) {
geofield list is back.
Comment | File | Size | Author |
---|---|---|---|
#11 | 2852506-11.patch | 913 bytes | Tim Bozeman |
#10 | interdiff-5-10.txt | 1.37 KB | marcoscano |
#10 | 2852506-10.patch | 922 bytes | marcoscano |
#5 | leaflet_map-no_field_recognized-2852506-5.patch | 1.37 KB | madar |
leaflet_map-views_style_option-disable_handler_check.patch | 1.21 KB | madar |
Comments
Comment #2
madar CreditAttribution: madar as a volunteer commentedComment #3
friera CreditAttribution: friera as a volunteer commentedIt works for me!
Comment #4
abrakadobr CreditAttribution: abrakadobr commentedi confirm problem, and confirm patch with addon:
Comment #5
madar CreditAttribution: madar as a volunteer commentedAbrakadobr solution works for me on 8.3.0. Here is a patch with code from #4.
Comment #6
nottaken CreditAttribution: nottaken commented#5 patch worked for me.
Comment #7
ipwa CreditAttribution: ipwa commentedI can now choose the geofield but when trying to view the map I get an error.
Comment #8
waspper CreditAttribution: waspper as a volunteer and at Skilld commentedPatch provided in #5 made my Views map style -- Leaflet (Old) -- to work nicely.
Comment #9
GrimreaperHello,
I applied the patch from #5 and it solved the problem thanks.
Comment #10
marcoscanoI don't think the approach in #5 is the safest one.
If we just use the correct class we can keep the first conditional. The patch attached solves the problem for me.
Comment #11
Tim Bozeman CreditAttribution: Tim Bozeman at CyberSolution for Sagetree commentedRerolling #10 which seems to be doing the job.
Comment #12
polynya CreditAttribution: polynya at Edo commentedPatch #10 is working correctly. Patch #11 cannot be applied to 8.x-1.x branch.
Comment #13
ckaotikPatch in #10 works like a charm and applies cleanly to the 8.x-1.x dev branch.
The patch in #11 only applies to 8.x-1.0-beta1, but not to the current dev release. That code was changed on 2016-10-11.
Comment #14
ckaotikJust realized that this is a duplicate of #2839538: LeafletMarker could not recognize geofield. That issue has an RTBC patch, so let's go with that instead.