Added a geofield field, but LeafletMarker always say "Please add at least one geofield to the view.". And it indeed works.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jian he created an issue. See original summary.

jian he’s picture

Status: Active » Needs review
FileSize
924 bytes
jhedstrom’s picture

Status: Needs review » Reviewed & tested by the community

Verified this fix works.

jhedstrom’s picture

Note, the Drupal\views\Plugin\views\field\Field plugin is deprecated, and the class in this patch is now standard in 8.3.x.

Jerenus’s picture

It 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.

madar’s picture

asak’s picture

This does indeed solve the problem, and seems more simple than #2852506

PhilippVerpoort’s picture

I 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.

GaëlG’s picture

Issue summary: View changes

#5 does not apply to latest dev, but #2 does. It's because half of the #5 patch has already been committed.

  • itamair committed 09920d6 on 8.x-1.x
    Issue #2839538 by jian he, Jerenus: LeafletMarker could not recognize...
itamair’s picture

Both patches have been committed to dev. The #2 will still apply to the beta1 ...

itamair’s picture

Version: 8.x-1.x-dev » 8.x-1.0-beta1
itamair’s picture

Sutharsan’s picture

Status: Reviewed & tested by the community » Fixed

The fix is available in the current (8.1.0-beta3) release. I guess the status should be 'Fixed'

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.