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.
Added a geofield field, but LeafletMarker always say "Please add at least one geofield to the view.". And it indeed works.
Comment | File | Size | Author |
---|---|---|---|
#2 | 2839538-geofield-recognize.patch | 924 bytes | jian he |
Comments
Comment #2
jian he CreditAttribution: jian he commentedComment #3
jhedstromVerified this fix works.
Comment #4
jhedstromNote, the
Drupal\views\Plugin\views\field\Field
plugin is deprecated, and the class in this patch is now standard in 8.3.x.Comment #5
Jerenus CreditAttribution: Jerenus as a volunteer commentedIt looks like both LeafletMarker.php and LeafletMap.php have
if (is_a($handler, '\Drupal\views\Plugin\views\field\Field')) {
I think both of them need to be changed. Otherwise the views will still show the error.
The patch is face to the latest dev version of leaflet. It works good for my instance.
Comment #6
madar CreditAttribution: madar as a volunteer commentedThere is a different solution by abracadobr in #2852506: No field recognized in 'Leaflet map' views style settings in 8.3.0-alpha1
Comment #7
asak CreditAttribution: asak commentedThis does indeed solve the problem, and seems more simple than #2852506
Comment #8
PhilippVerpoortI had the same problem, and after applying the patch in #5, it was solved for my installation. Mine was based on Drupal 8.3.x and Leaflet 8.x-1.x-dev.
I suggest pulling this patch into the development branch so that it's easier for people to obtain a working version of the module, and also to get it ready for shipping with the next release of the module.
Comment #9
GaëlG#5 does not apply to latest dev, but #2 does. It's because half of the #5 patch has already been committed.
Comment #11
itamair CreditAttribution: itamair as a volunteer commentedBoth patches have been committed to dev. The #2 will still apply to the beta1 ...
Comment #12
itamair CreditAttribution: itamair as a volunteer commentedComment #13
itamair CreditAttribution: itamair as a volunteer commentedComment #14
Sutharsan CreditAttribution: Sutharsan at LimoenGroen commentedThe fix is available in the current (8.1.0-beta3) release. I guess the status should be 'Fixed'