This module is very useful and so I have installed it to test out. I followed Readme instructions which mostly worked fine, certainly for displaying the map for field display all worked well.
However I had trouble getting the view working as it kept telling me I had not got a country field in my view, I tried various things renaming and recreating field, adding display again and adding field over again etc, but nothing helped.
There is a similar issue in leaflet module queue with a patch here:
https://www.drupal.org/node/2839538
I noticed similar code in this module - so also changed Field to EntityField, as in this patch, and bingo it works!
Line 162 of modules/leaflet_countries/src/Plugin/views/row/LeafletCountry.php changed:
// if (is_a($handler, 'Drupal\views\Plugin\views\field\Field')) {
if (is_a($handler, 'Drupal\views\Plugin\views\field\EntityField')) {| Comment | File | Size | Author |
|---|---|---|---|
| #3 | views_not_regonising_field-2906645-3.patch | 872 bytes | tanc |
Comments
Comment #2
tancGreat! Thanks so much for testing and feeding back. I'm pressed for time to work on this module at the moment but when I do I'll test your code change and let you know. Thanks again!
Comment #3
tancFinally! I have some time for this module. Here is a patch of your change.
Comment #5
tanc