Skip Navigation

[Resolved] Map don't load if one of the posts is not well filled (2)

This support ticket is created 6 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 23 replies, has 2 voices.

Last updated by Nigel 6 years, 1 month ago.

Assisted by: Nigel.

Author
Posts
#1111519

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Let me mark this as escalated again, and when I get feedback from my colleague I'll report back to you.

#1112291

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Dequeuing the Events Calendar JS for maps seems to fix the issue that is causing the JS errors and preventing the map from displaying the markers.

From your earlier comments I understand you would only want to do that on certain pages, because you may use the Events Calendar maps on other pages.

Is it only the /lieux/ page where you want to use Toolset Maps? Any other pages?

I'll write a little code snippet you can use to disable the Events Calendar JS on certain pages.

#1112292

Yes it is only the /lieux/ page where I want to use Toolset Maps.
Thank you very mcuh.

#1112807

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Roman

You can add this code to your site to de-register the Maps JS from the Events Calendar on the specified page ('lieux', but you can add more to that array if needed).

add_action( 'wp_enqueue_scripts', 'tssupp_deregister_tribemaps', 100 );
function tssupp_deregister_tribemaps() {

	if ( is_page( array( 'lieux' ) ) ) {

		wp_deregister_script( 'tribe-gmaps' );
	}
}

That will fix the JS errors that are preventing the Toolset Map from loading on that page, and hopefully resolve the problem.

#1112872

Thank you for this script, which in deed solves the API loading issues on /lieux/ page.
Nevertheless, the map pins still don't load.
Thank you.

#1113037

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

I'm sorry to hear that.

On my slimmed down copy of your site installed locally it works as expected.

And on a test site with the Events Calendar I cannot reproduce the problem that a map showing venues breaks if one or more of the venues is missing location data.

I'm at a bit of a loss as to what to do next, and am passing this back to my colleagues for further advice. I'll keep you posted.

#1132604

Hello,
It's been about a month now ; have you had any answer on this problem ?
Thank you.

New threads created by Nigel and linked to this one are listed below:

https://toolset.com/forums/topic/split-map-dont-load-if-one-of-the-posts-is-not-well-filed/

#1132824

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Roman

I must apologise, my colleague asked me to create a new thread and assign it to him so that he can start from the beginning, and I missed that message.

Before I do, I have taken an updated copy of your site so that I can do some more debugging.

I've found a post where I can get the map to work, and another where it will not, and with that I might be able to identify an issue that I can replicate and which will make it much easier to identify the solution.

I'm sorry for the long delay, it is my fault.

I will update you again in the morning.

#1133326

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Roman

You should have received notice that I split this thread, where I have given an updated description of the problem, and I have re-assigned it to Beda from second-tier, as I have run out of things I can test.

So there is nothing more I can do here except once more apologise for the delay.