• royvisser

    (@royvisser)


    Hello,

    I’m experiencing a conflict between TranslatePress and the Google Maps API on my website. When TranslatePress is active, I get the following errors in the console:

    • Uncaught ReferenceError: google is not defined
    • jQuery.Deferred exception: google is not defined
    • window.google not found after 10 seconds

    These errors prevent Google Maps from loading correctly on my site. Addresses don’t autofill, and occasionally, the map stays blank. After troubleshooting, I confirmed that TranslatePress is the source of the conflict.

    Additionally, I’ve noticed that TranslatePress significantly increases the page loading time, adding around 1 to 1.5 seconds per page load.

    I’d appreciate any guidance on how to resolve the Google Maps API conflict and if there are any optimizations available to reduce the plugin’s impact on loading times.

    Thank you!

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Anca

    (@ancavictoria)

    Hello,

    Could you please let me know what you used to add Google Maps to your site so I can reproduce the issue?

    The translated version of the default language page is expected to be a little bit slower than the default language due to the translation that needs to be loaded from the database, but the difference shouldn’t be significant.
    The best approach now would be to perform a Database Optimization from Settings –> TranslatePress Settings –> Advanced tab –> Debug. See if this procedure will help.

    Enabling the “Fix missing dynamic content” option in TranslatePress Advanced Settings – Troubleshooting could potentially improve page speed.

    Another option that may enhance performance is checking “Yes” for the “Disable translation for gettext strings” option in TranslatePress Advanced Settings – Debug. Checking this option is for testing purposes.

    Another performance thing you might want to look for, is that we have a listener for Javascript strings that when it detects a text change on the page (say a particular JS script adds a notice), we query the server for a translation. This ajax call is also fast as it doesn’t go through the normal WordPress ajax, however, it can cause issues when there is a lot of traffic to your website.
    The good part is that you can disable this functionality from TranslatePress Settings -> Advanced tab –> Troubleshooting section –> Disable dynamic translation.

    The “Automatic Translation Memory” option in TranslatePress Advanced Settings – Miscellaneous options can have a negative impact on page speed. You can disable it to check if the page load improves.

    Kind regards,

    Anca

    Thread Starter royvisser

    (@royvisser)

    Hi Anca,

    Thank you for your response. I’m using the Listeo plugin to integrate Google Maps on my website. I’ve tried all the steps you suggested, including Database Optimization, enabling “Fix missing dynamic content,” disabling translation for gettext strings, and turning off dynamic translation, but unfortunately, the issue persists. The map still only partially loads, with addresses sometimes not autofilling, and the map occasionally remains blank.

    If you have any additional suggestions or know of other potential solutions, I would greatly appreciate your guidance.

    Thanks again!

    Best regards,
    Roy

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.