[Appointments+] Fatal Error when Locations add-on is enabled

When I enable "Service Locations" add-on in Appointments+, the "Services" tab in Appointments settings goes blank. The same happens to the "Service Providers" add-on when the "Worker Locations" add-on is enabled. We tried a full plugin/theme conflict test. It didn't help.
Debug.log shows the following error message: PHP Fatal error: Uncaught Error: Call to a member function get_map() on null in /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/appointments/includes/pro/includes/addons/lib/app_locations.php:333 (full debug log has been attached in the chat transcript). Please advice.

  • Adam Czajczyk
    • Support Gorilla

    Hello Grant,

    I hope you're well today and thank you for your question!

    I have accessed and checked your site and also tried to replicate it on my end. On your site, there was a "Locations on Google Maps" add-on enabled in Appointments+, in addition to "Locations" one. When I enabled Service Locations and Workers Locations add-ons, I was able to see the issue on your site.

    I was also able to replicate it on my end when I removed Google maps API key from the Google Maps Pro plugin settings on my setup. I noticed that this is not configured on your site too.

    When I disabled a "Locations on Google Maps" add-on on your site, while keeping "Locations", "Service Locations" and "Worker Locations" enabled, the issue was gone and both "Services" and "Service Providers" tab were available. The same happens on my own setup.

    The error that you're getting also seems to confirm that as it seems like the plugin is not able to access/create a Google Map.

    For now, I left "Locations", "Service Locations" and 'Worker Locations" enabled but disabled "Locations on Google Maps". Would you please go to the "Settings -> Google Maps Pro" page and configure Google Maps API Key there?

    Once that's done, please clear all caches (site/server) and try enabling "Locations on Google Maps" add-on again, then check "Services" and "Service Providers" tabs and let me know if they are working then.

    Best regards,

  • Grant
    • Design Lord, Child of Thor

    Hi Adam,
    Thanks for your work in reviewing this case.

    I have added a Google Maps API, and confirmed operation by inserting a map in a post - which is showing up successfully.

    The services and locations tabs still dont show for me though.
    With the Appointments+ google maps plugin disabled, I am still unable to edit service providers (http://businessstrategy.nz/wp-admin/admin.php?page=app_settings&tab=workers#section-edit-worker) the 'edit' button seems unresponsive for me.

    I do not actually require the google maps plug in.

    What I am trying to achieve is:
    * I am the only 'real' service provider.
    * I work in one location #1 Mondays and Tuesdays
    * I work in location #2 Wednesdays
    * I work in location #3 Thursdays and Fridays

    my calendar is bi-directionally synched as the main calendar (http://businessstrategy.nz/wp-admin/admin.php?page=app_settings&tab=gcal)

    I want the simplest configuration to allow people to book an appointment with me, reflecting the correct location for the correct day, and making sure I have the appointment space available in my diary.

    Thank you,

  • Predrag Dubajic
    • Support

    Hi Grant,

    It seems that there's an issue with Membership 2 actually causing this and our developers are looking into it for the next release of M2 that's being worked on.

    At the moment you can temporarily disable M2 while you configure your locations and then turn it back on.

    Best regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.