Home › Forums › Calendar Products › Events Calendar PRO › How can I disable google maps completly
- This topic has 15 replies, 2 voices, and was last updated 7 years, 10 months ago by
Martin Schmucki.
-
AuthorPosts
-
May 2, 2018 at 7:15 am #1521008
Martin Schmucki
ParticipantHi
I disabled google maps in the settings but get an API error.
How can I disable the service completly?Thanks,
ChrisMay 2, 2018 at 10:08 am #1521223Sky
KeymasterHi Chris!
Thanks for reaching out! I will try to help with this.
Can you provide a link to where the error can be seen, or a screenshot of the error?
Thanks,
SkyMay 2, 2018 at 9:08 pm #1521643Martin Schmucki
ParticipantHi Sky
It’s the “normal” Google Maps API error message that I didn’t set an API-Key.
But the point is I don’t want Google Maps, I would like to disable this completly.
Thanks,
ChrisMay 3, 2018 at 8:42 am #1522066Sky
KeymasterChris,
In addition to unchecking “Enable Google Maps” can you try unchecking the “map view” in Events > Settings > Display > “Enable event views”
Is the error still showing after that change?
Thanks,
SkyMay 8, 2018 at 5:39 am #1525072Martin Schmucki
ParticipantNo that’s not working :/
May 8, 2018 at 7:15 am #1525189Sky
KeymasterChris,
Ok, thanks for checking. It looks like the script is enqueued even when all of that stuff is disabled.
You can add the following to your functions.php to prevent the script from being loaded.
wp_deregister_script( 'tribe-gmaps' );
Let me know if that helps!
Thanks,
SkyMay 8, 2018 at 9:03 pm #1525866Martin Schmucki
ParticipantHi Sky,
I tried that solution but without success.
My code looks like:
add_action( 'wp_enqueue_scripts', 'my_deregister_javascript', 100 ); function my_deregister_javascript() { wp_deregister_script( 'tribe-gmaps' ); }Is the code wrong?
Regards,
Chris-
This reply was modified 7 years, 12 months ago by
Martin Schmucki.
May 9, 2018 at 7:20 am #1526138Sky
KeymasterChris,
Yes, that code looks perfect. I apologize for not providing the complete code earlier. When I add that to my functions.php, I do not see the warning in the console any more. As soon as I remove the snippet and reload the page, the warning comes back.
But I have the maps disabled in the settings as I described earlier.
Where are you adding that code?
Thanks,
SkyMay 13, 2018 at 10:46 pm #1529384Martin Schmucki
ParticipantHi Sky,
I don’t know why but it doesn’t work :/
And I disabled all views, only “List” is activated.
Regards,
ChrisMay 14, 2018 at 6:10 am #1529614Sky
KeymasterChris,
Interesting. You are putting this in your theme or child theme functions.php? Is there other code in there? Can you share with me the complete file?
You might also try bumping the priority to 999, though I’m not sure why this would work on my end with it set to 100 and not for you.
Thanks,
SkyMay 24, 2018 at 1:31 am #1537731Martin Schmucki
ParticipantHi
Sorry for the late response, but at the moment I’m overwhelmed with work ๐
I tried the code in both functions.php but haven’t any success.
I don’t think it doesn’t work because the license isn’t registered?Can you maybe have a look at it, I can send you WordPress + the FTP-Login.
Cheers,
ChrisMay 24, 2018 at 8:48 am #1538026Sky
KeymasterChris,
Sorry to hear that you are not able to get this working. Unfortunately, it is against our terms of service to accept login credentials for customer sites.
Can you provide a link to a page where the error is showing?
Can you upload a copy of your child theme’s complete functions.php file?
Also, can you provide your system information?
Thanks,
SkyJune 12, 2018 at 12:44 am #1551224Martin Schmucki
ParticipantHi again
I found out if I clear this file:
/events-calendar-pro/src/Tribe/Asset/Ajax_Maps.phpThe googlemap files doesn’t load, I tried this code in my functions.php:
wp_deregister_script(‘tribe-gmaps’);
wp_deregister_script(‘tribe-events-pro-geoloc’);But no success ๐
I don’t know why -.-Any idea?
Best Regards,
ChrisJune 12, 2018 at 11:12 am #1551738Sky
KeymasterHi again,
Can you please provided the information I requested above?
* link to a page where the error is showing
* copy of your child themeโs complete functions.php file
Thanks,
SkyJune 13, 2018 at 2:23 am #1552118Martin Schmucki
ParticipantThis reply is private.
-
This reply was modified 7 years, 12 months ago by
-
AuthorPosts
- The topic ‘How can I disable google maps completly’ is closed to new replies.
