Map is not showing in incognito mode

Hi, I have a website where the map is not showing. I think the issue is about the rights, basically, I can see the map if I am logged into the WordPress account but I am not logged the map doesn’t show.
Any clue on how I can fix this issue? Thank you


If something shows when logged in but not logged out, my first suspect is caching. I’d try n disable it to check, and if it then shows, find which setting messes with the map

There is no cache at all enabled.

Then what’s that purge cache button in the adminbar? Haha

If no caching plugins are enabled and no cache on the server than no clue, sorry

That’s not cache. Look what is.

<?php /* Plugin Name: Purge Cache Description: Adds a button to the WordPress dashboard to clear the object cache */ add_action( 'admin_bar_menu', 'add_purge_cache_button', 999 ); function add_purge_cache_button( $wp_admin_bar ) { if ( ! current_user_can( 'manage_options' ) ) { return; } $args = array( 'id' => 'purge-cache', 'title' => 'Purge Cache', 'href' => '#', 'meta' => array( 'class' => 'purge-cache' ) ); $wp_admin_bar->add_node( $args ); } add_action( 'admin_footer', 'add_purge_cache_script' ); function add_purge_cache_script() { if ( ! current_user_can( 'manage_options' ) ) { return; } ?>
<script>
jQuery(document).ready(function($) {
    $('#wp-admin-bar-purge-cache').click(function() {
        if (confirm('Are you sure you want to purge the cache?')) {
            $.ajax({
                url: '<?php echo admin_url( 'admin-ajax.php' ); ?>',
                data: {
                    action: 'purge_cache',
                },
                success: function() {
                    alert('Cache purged successfully!');
                },
                error: function() {
                    alert('An error occurred while purging the cache.');
                }
            });
        }
    });
});
</script>
<?php

}

add_action( ‘wp_ajax_purge_cache’, ‘purge_cache_callback’ );

function purge_cache_callback() {
global $wp_object_cache;
if ( ! current_user_can( ‘manage_options’ ) ) {
wp_die();
}

wp_cache_flush();

wp_die();

}

even with the snippet “Purge Cache” disabled is not working.

You have some optimization plugin deferred Bricks script.
Maybe your Litespeed cache plugin.

Try to disable it.

2 Likes

Thank you, I have found the fix for the problem, it is the “Defer Parsing JavaScript” snippet that causes the issue. After I have disabled that code snippet the map is loading.