Skip Navigation

[Resolved] JS script Error Google Maps Api makes the browser unresponsive

This support ticket is created 8 years, 1 month 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
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 14 replies, has 2 voices.

Last updated by johanL-2 8 years ago.

Assisted by: Shane.

Author
Posts
#369447

I am trying to:
Edit a custom type which has the address field. The browser gets unresponsive (chrome, fireox, IE). The debugger says:

timeout: Connection timeout. Check the Error Console on both ends for potential error messages. Reopen the Web Console to try again.
unreachable code after return statement jquery.rolepermissions.js:108:8
Use of Mutation Events is deprecated. Use MutationObserver instead. load-scripts.php:4:5722
You have included the Google Maps API multiple times on this page. This may cause unexpected errors. js:85:295
Gg() js:85
<anonymous> js:119
google.maps.Load() js:18
<anonymous> js:119
<anonymous> js:23

unreachable code after return statement jquery.rolepermissions.js:108:8

I have tried to disable WP Google Maps plugin but it did not help. When removing the address field from the type I got no JS error.

BR
Johan

#369915

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Johan,

Thank you for contacting our support forum.

I would love to assist with getting this issue resolved as quickly as possible.

Looking at your debug information I noticed that you have quite a large number of plugins installed.

I suspect that there is a plugin conflict that is causing this error to occur.

What I recommended that you do is to temporarily disable all you non-toolset plugins and try again.

If the error does not occur then we are dealing with a plugin conflict.

Please let me know the results.

Thanks,
Shane

#369946

Hi Shane!
I have disable all pkugins but still have problem. When Im starting the debug in Firefox i got this:
timeout: Connection timeout. Check the Error Console on both ends for potential error messages. Reopen the Web Console to try again.
Use of Mutation Events is deprecated. Use MutationObserver instead. load-scripts.php:4:5722

A script on this page may be busy, or it may have stopped responding. You can stop the script now, open the script in the debugger, or let the script continue.

Script: hidden link
Looks like it is the load-scripts.php

Use of Mutation Events is deprecated. Use MutationObserver instead. load-scripts.php:4:5722
too much recursion
load-scripts.php:5:30683
Error: Stack overflow wp-emoji-release.min.js:2:282
too much recursion
ga()
load-scripts.php:2
.find()
load-scripts.php:2
m.fn.init()
load-scripts.php:2
e.fn.init()
load-scripts.php:8
m()
load-scripts.php:2
_getTrigger()
conditional.js:79
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
_getTrigger()
conditional.js:112
load-scripts.php:2:6857

#370372

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Johan,

I noticed from your debug information that you are running php version 5.4

Currently wordpress now requires a minimum of version 5.6

Would it be possible for you to contact your hosting provider and ask them to update you to at least version 5.6 ?

Let me know the result once you have done this.

Sometimes simply updating the php version can resolve many issues 🙂

I look forward to hearing from you soon.

Thanks,
Shane

#370786

Hi,
I updadeted the PHP but I still had the issue. After some testing and redoing my types I found out that it was when I used conditions which could not be executed within the postfield it crashed. Here is an example, I have a field Map within a post which has the condition that field show map eq 2. The thing is that I cannot reuse any slug for a field so I ends up with a lot of field with the same name but with different slugs. Which is very enoying as I havent used the fields anywhere else. However, when I within a condition selects a field by name not slug, I can select a field which is not present within the type. So when I try to edit this type with fields with the not correct conditions the script goes banans and crashes the webrowser.
BR
Johan

#371003

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Johan,

Thank you for the explanation but i'm not able to understand clearly 🙁

Would it be possible for you to provide me with admin access to the website as well as to an example where the problem is?

This will allow me to see and debug the issue first hand to see what's up.

The private fields will be enabled for your next response.

I look forward to hearing from you soon.

Thanks,
Shane

#371913

This is not reslove, i must have been to fast to send the response. Please reopen

#372173

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi John,

I've re-opened this ticket and taking a look at it now.

Thanks
Shane

#372189

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Johan,

I took a look at this for you and everything seems to be fine.

I'm using a Mac with chrome and firefox and i wasn't getting any errors in my console.

Could you let me know which operating system you are using ?

Thanks,
Shane

#372363
Skärmklipp.JPG
372066-many_custom_fields.jpg

Hi,
I have tried win8 win 10 with chrome, firefox an IE and I have also tried it from my Iphone with Ios running safari and I got the same issue. Did you try to edit any of the post in seglingar?
Here is what i try to do:
The unresponsive browser problem occur when I’m editing a custom post in this case "Seglingar" which contains a post filed group with field containing conditions which points to custom field not present within the custom post. Example: I would like to have a field with a condition. But as I have many custom field named the same but with different slug names (I guess this is another issue as I cannot reuse custom field in other posts or within in the same post(If I create a filed and then remove it I cannot reuse it without changing the slug name even though it is not used in any post field group )) I see a list of custom fields named the same. I then select one of them to use within the condition. If I select a custom filed which a believe exist within the post but in reality the selected custom field is just named as the field within the post but with a different slug which is not present within the field group. No I have a condition that looks correct but it is pointing to a custom field which cannot be resolved when loading the post for editing. When removing all conditions the editing works as it should. I hope this mad it more clear. There is a private message within the old ticket for accessing the site. Please tell if you need a new one.

#372371
condition.JPG
codition.JPG

You can compare the custom types Seglingar and Aktiviteter.
You cannot edit any post in Seglingar as the browser gets unresponsive but in aktiviter you can.
The difference that I have notice is that all conditions within Aktiviteter are ok but in Seglingar some codnitions have filed slugs which is not found with in the post. But the slugs are named the same when selecting them.
BR
Johan

#372651

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Screen Shot 2016-03-03 at 11.34.50 AM.png

Hi Johan,

I was able to see the issue.

Doing a bit of debugging I was able to notice that there was some slug mismatching in the conditional group. See Screenshot

Notice that the slugs are different.

Could you change the slugs to match and let me know if this helps.

Thanks,
Shane

#372699
same name.jpg
empty condition.JPG

Hi,
When testing before with less conditions I found that when fixing the mismatch of the slug the problem is solved. However, should it not be any type of exception handling for this type of events so your browser do not crash ?

Now when we come to another problem when Im trying to change the slugs to fix the mismatch. The advance box is empty. So I then go to basic mode. But there I have a list with a lot of fields named the same. So it makes it very hard to know which one to select. So it is no chance for me unless I go trail and error for each condition. And that is very time consuming and not very user friendly

I would like to reuse some custom fields in other field groups. Use one field calld price in both Seglingar and Aktiviteter but that seems not to work. Then I got the "field slug is already used". why?
BR
Johan

#372947

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Johan,

I agree that there should be so I will mention it to our development team.

What I recommend that you do when you have common custom fields that are going to be shared by multiple post types is to create a separate field group with only those fields.

The reason for this is a slug is a unique identifier for a custom field. This means that 2 custom fields cannot have the same field name.

Thanks,
Shane

#373230

Hi,
I have now redone the fields into groups as you suggested and it helped a lot. I also cleared all slugs not needed. So my conclusion is that due to bad design from my side a lack of exception handle was revealed. Thanks for helping me out!
BR
Johan

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.