If your store locator is displaying a white blank screen, the most common reason is that the Google Maps library, which serves as a crucial dependency for the plugin, is not loading on the page. This issue can arise due to various factors, and understanding the common reasons behind it can help troubleshoot the problem effectively.
If your store locator is just like the above screenshot, the most common reasons are listed below that can be useful to fix the problem.
Here are a couple of examples showing up how the Google Maps library has been removed from the page by some known plugins.
WP Rocket Plugin
WP Rocket plugin has replaced the src attribute of the URL with data-rocket-src due to which Google Maps will not load on the page.
GDPR Cookie Compliance Plugin
Here is another example of a compliance plugin that removes the Google Maps library from the page, as it has changed the attribute src into data-cmplz-src, due to which the store locator will not work.
Unblock our library from that GDPR plugin.
http://your-domain.com/wp-content/plugins/agile-store-locator-pro/public/js/asl_libs.min.js
GDPR Cookie Consent Plugin
An example of a cookie plugin that changes the Google Maps library into a plain/text script, which will definitely not execute due to its type as plain text.
Reasons for Google Maps Library Not Loading: #
- Caching and Optimization Plugins: Caching and optimization plugins, such as WP Rocket, Autoptimize, or WP Optimize, are designed to improve website performance. However, they can sometimes cache, concatenate, or minify the Google Maps library code, leading to its failure to load correctly.
- Security and Firewall Plugins: Security and firewall plugins, including Wordfence, Sucuri, or iThemes Security, focus on protecting websites from threats. These plugins often have strict script restrictions or firewall rules that may unintentionally block the Google Maps library from loading on the page.
- Conflicting Themes or Plugins: In some cases, conflicts between themes or other plugins can disrupt the loading of the Google Maps library. This can happen due to incompatible code or overlapping functionalities that prevent the library from being loaded properly.
Solutions to Fix the Issue: #
To address the problem so that the Google Maps library can load on the page properly consider the following solutions:
- Disable Cache or GDPR Plugin: Temporarily deactivate any cache or GDPR plugins to identify if they are causing the issue. If the store locator starts working after disabling the plugin, review the plugin’s configuration and adjust the settings to allow the Google Maps library to load properly.
- Check GDPR Borlab Options: Verify that you haven’t enabled the GDPR Borlab options in the ASL settings. If you want to use GDPR with the Borlabs plugin, follow the provided GDPR documentation guide to enable it correctly without interfering with the Google Maps library.
- Ensure Single Shortcode Instance: Confirm that you have added only one instance of the shortcode [ASL_STORELOCATOR] on a single page, having multiple instances on the same page can lead to conflicts from loading.
If none of the above solutions resolve the issue with your store locator, we are here to assist you further. Please reach out to us at support@agilelogix.com and provide us with the URL of your store locator. If you are using the pro version of the plugin, kindly include your purchase code in the email. Our support team will promptly assist you in diagnosing and resolving the issue to ensure the smooth functioning of your store locator.