Hi @aahulsebos,
Although we’re using a custom theme the maps dependency is handled by the plugin “The Events Calendar” (https://theeventscalendar.com/products/wordpress-events-calendar/). So I think this is not the same problem as I described it in my other thread. We have no possibility to make changes to their code. Is there a way to make this work?
Thanks in advance!
Jonas
Hi @bytefight,
On the page you posted I can see the placeholder, is this issue solved?
Hi @rogierlankhorst,
You are right, the placeholder is showing correctly and after clicking it the mapg loads as expected. But after I refresh the page, the maps isn’t loading anymore and the console shows an error. So it works initially but after a page refresh the map is not loading correctly.
Did you add the events calendar .js file to the block list yourself? We don’t have an events calendar integration shipped in the plugin.
When reloading, it works about 9 times out of 10 as expected, but I had one reload which didn’t work. At that moment, the missing google variable was causing a jquery error. Maybe it needs a dependency declaration, something like this:
/**
* Conditionally add the dependency
* $deps['wait-for-this-script'] = 'script-that-should-wait';
*/
function cmplz_eventscalendar_dependencies( $tags ) {
$tags['maps.googleapis.com'] = 'the-events-calendar/src/resources/js/embedded-map.';
return $tags;
}
add_filter( 'cmplz_dependencies', 'cmplz_eventscalendar_dependencies' );
Hi @rogierlankhorst,
This snippet works great! Yes, I’ve added the script to the blocklist. See screenshots for my current configuration and snippets in functions.php, so you can integrate it in your plugin:
https://ibb.co/whdY7vv
https://ibb.co/SQytbBK
Thanks for your help!
Thanks for confirming, I’ll add it to our integrations list.
Hey @bytefight
I have the same problem (with Avada Theme – if this information is necessary)
Can you post new screenshots of your configuration, because the links are expired.
many thanks