1

I have CiviCRM v5.44.0 running on WordPress 5.8.3 and am using Leaflet Map and Leaflet Map CiviCRM Integration with the Data Processor extension and Geocoder extension. Thus far, I am unable to get the map to display any of my members. I specifically set one member with the Membership Type and Logo. Everything I am doing is based upon:

https://civicrm.org/fr/node/11212

My map code is as follows:

[leaflet-map lat=32.186806687571355 lng=-100.63476562500001 zoom=3 zoomcontrol !detect-retina]
[leaflet-civicrm-api entity=Contacts action=get lng_property='longitude' lat_property='latitude' profile=local popup_text='<img src="{logo}"><br/><strong>Name: </strong>{organization_name}<br><strong>Services: </strong>{services}'][/leaflet-civicrm-api]

To that point, Services has 3 options just like the example. Logo is an upload field for a logo. Organization Name is the name of the company that the person works for.

API entity is set to Services and the fields have all been added according to post instructions.

Only a blank map appears.

The CiviCRM is a plugin running on WordPress inside of the main domain and set to local. The page is located here:

https://www.iafst.org/iafst-map/

Also, end up with these errors after clearing the cache and triggered by WP Plugin Integration between Leaflet Map and CiviCRM (version 1.0.7):

An error of type E_COMPILE_ERROR was caused in line 21 of the file /home/xxxxx/public_html/wp-content/plugins/integration-between-leaflet-map-and-civicrm/shortcodes/class.civicrm-api-shortcode.php. Error message: require_once(): Failed opening required 'LEAFLET_MAP__PLUGIN_DIRshortcodes/class.shortcode.php' (include_path='.:/opt/alt/php74/usr/share/pear')

Any help would be appreciated.

3
  • Maybe a silly question but is leaflet-map activated in the wordpress plugins? That error sounds like the LEAFLET_MAP__PLUGIN_DIR is not getting defined, which happens when leaflet-map loads.
    – Demerit
    Jan 15 at 21:56
  • Yeah, both were activated as per instructions. I was seeing a blank map properly defined because I had to work with the shortcode settings in there to get the :flavor" of map I wanted. When I cleared the cache, it triggered the error and I have since deactivated the plugins. Jan 15 at 22:05
  • Ok. I don't know how load order works in wordpress but maybe the integration plugin is loading before leaflet-map, so the define hasn't happened yet. Is there a way to make sure leaflet-map has a higher priority?
    – Demerit
    Jan 15 at 22:14
1

Not sure why; however, when I uninstalled and reinstalled the plugins everything works now. Ghost in the Machine I suppose.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.