map bubble issue
This topic contains 16 replies, has 5 voices, and was last updated by Nicolas Antoine 4 years, 9 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support TicketTagged: map bubble, snippet
-
AuthorPosts
-
December 23, 2019 at 7:19 pm #522908
Hi,
I am having a recurring maps issue that I thought was resolved. This issue keeps coming back when I return to the map on the front page of my site after leaving the site for a while. When clicking on one of the map icons it results in an error message and the map bubbles don’t load.
My site is at http://www.hearabouthere.com
Any help would be appreciated.
Thanks
VictorDecember 23, 2019 at 7:20 pm #522909This reply has been marked as private.December 23, 2019 at 7:58 pm #522912Hi Victor,
Thanks for your post. I’ve clicked a few map markers and I’m able to open the map bubbles without issues. Could you be more specific? How do you replicate it? Maybe you should try clearing your browser cache?
December 27, 2019 at 9:41 am #523155Hi Victor,
I checked with different browser with clearing cache each time. It worked fine for me (see attachment).
If you see issue again try following PHP snippet.
/** * Validate map bubble nonce using referer. */ function gd_snippet_fix_map_bubble_issue( $errors ) { if ( is_wp_error( $errors ) && ! empty( $_REQUEST['_wpnonce'] ) && ! empty( $_SERVER['REQUEST_URI'] ) && strpos( $_SERVER['REQUEST_URI'], '/wp-json/geodir/' ) !== false && strpos( $_SERVER['REQUEST_URI'], '/markers/' ) !== false && is_wp_error( $errors ) && $errors->get_error_code() == 'rest_cookie_invalid_nonce' ) { $parse_referer = wp_parse_url( wp_get_referer() ); // Http referer $parse_home = wp_parse_url( home_url( '/' ) ); // Home url if ( ! empty( $parse_referer['host'] ) && ! empty( $parse_home['host'] ) && strtolower( $parse_referer['host'] ) == strtolower( $parse_home['host'] ) ) { return true; } } return $errors; } add_filter( 'rest_authentication_errors', 'gd_snippet_fix_map_bubble_issue', 99999, 1 );
Check here about how to use PHP snippet. https://wpgeodirectory.com/docs-v2/faq/customizing/#snippets
Regards,
KiranDecember 30, 2019 at 8:25 pm #523439Hi Kor and Kiran,
Thanks for your messages.
I just tried this on ios safari and chrome desktop and received an error, and white box pops up with a spinning arrow.
A screenshot of the box with arrow on ios and a screenshot on chrome desktop are attached.
I note that if I reload the page then the map bubble loads correctly. I have only seen this on the front page map not the location page map.
I note your comment about the php snippet. Would you suggest I use this to address this issue? I don’t need to customize this other than to get the map bubble to load.
Any help appreciated.
thanks
VictorDecember 30, 2019 at 9:06 pm #523447This reply has been marked as private.December 31, 2019 at 6:08 am #523490Hi Victor,
Map bubble worked fine for me as well in Safari, Chrome & Firefox. If you add PHP snippet then it will prevent cache issue with map bubble.
Let us know.
Regards,
KiranJanuary 2, 2020 at 1:36 pm #523697Hi Kiran,
I am continuing to have this issue when I first go to the front page and click on a map element both on ios and chrome on my pc. If I reload the browser page after the error then it works fine.
Perhaps I should try the PHP snippet that you provided?
I wonder if there is something different about the map or my site that is different than the way others are using it. I tried refreshing the browser cache and even the cache at my webhost, siteground, but this issue keeps reappearing.
Any help or advice appreciated.
Thanks
VictorJanuary 2, 2020 at 1:49 pm #523699Hi Victor,
This error occurs when it fails to validate security nonce. I have tried many times in different browsers but can’t replicate issue. One of my team member also tried and it worked working fine for him also.
It looks like something cache related things that creating issue at your side.
Please try adding PHP snippet and let us know how it goes.
Best Regards,
KiranJanuary 2, 2020 at 2:44 pm #523706Thanks, Kiran.
I have tried on other devices and get the same issue when I access the map on the first load. On the bright side it appears it isn’t happening to others…
I haven’t enabled the supercacher on siteground either. Maybe that would help?
I will try the PHP snippet.
Best regards,
VictorJanuary 2, 2020 at 3:59 pm #523713Hi Victor,
Thanks for your reply. Yes, please test the PHP code snippet and if the issue persists, kindly record a screencast using this free tool https://screencast-o-matic.com/ and share it here for our reference.
January 3, 2020 at 12:22 am #523762We have the same issue, only happens on mobile though. (Sorry for hijacking but it may help us both)
Will test the PHP code shortly
January 3, 2020 at 5:11 am #523785Hi ukvape,
Thanks for your post. Kindly open a new ticket and we’ll check your GD setup.
January 3, 2020 at 1:42 pm #523852Hi Kiran,
The PHP snippet appears to have fixed the problem. Thanks for the help.
Best regards,
VictorJanuary 3, 2020 at 1:52 pm #523855Thanks for letting us know.
Kiran
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket