I'm receiving the following error when loading an edit page

I'm receiving the following error when loading an edit page with the plugin activated:

Uncaught SyntaxError: Unexpected string

Is occurring on google-maps.js on line 20 (minified script). In looking through the code, it appears to occur in between lines 521 and 522. When minified, it throws the error.

  • simplexity
    • Flash Drive

    It appears as if you are missing a + sign to concatenate the javascript on line 528 that is causing the problem. There's no + sign between 528 and 529 so when the javascript is minified it renders a string error.

    This is in the file located at /wpmu_dev_maps_plugin/js/admin/google-maps.js

  • simplexity
    • Flash Drive

    Also, there is a CSS conflict with the Advanced Custom Fields Pro plugin where the class .ui-front has too low of a z-index in their CSS which causes the Map options modal to appear at level 100, way below where needed with the Google Maps TB_window and TB_overlay z-index of 100050. More specific CSS should resolve that conflict. I replaced the code at line 176:

    div.ui-dialog {
    font-size: 1em;
    }

    with the following:

    div.ui-dialog.ui-front {
    font-size: 1em;
    z-index: 100060;
    }

    in the file /wpmu_dev_maps_plugin/css/google_maps_admin.css

  • Andre Foisy
    • The Incredible Code Injector

    Hi Simplexity,

    Welcome to the WPMU Dev community and thank you for contacting our support team.

    I'm sorry to see that you're experimenting those issues.

    JavaScript is a client-side scripting language that is executed by the browser. Simply said, when I go to your site where there's Google Map inserted with my browser, I do not get any of the error codes and messages that you get.
    From this page for example:
    http://indianapolis.simplicityfuneralandcremationcare.com/location/ it loads perfectly and nicely, check my screenshot below :slight_smile:

    Can you try to visit your page where you get those errors, with another browser than your actual one, and also restart your browser and try again.

    Let me know what come out. If this persists please post a URL to the code error pages, and a screenshot would also be very appreciated.

    Best regards,
    Andre

  • simplexity
    • Flash Drive

    Andre,

    If you read my post, you would have seen that I mentioned that the error was on the edit (admin) side not the public side. In follow up posts, I detailed exactly where the error was occurring and provided the solution as to how to fix it. I've already added the fix to the plugin on my site.

  • Andre Foisy
    • The Incredible Code Injector

    Hey Sim,

    You're right on the money my friend, looks like I've misread your post, I mean that you were actually reporting that error and actually managed to fix it on your own.

    It's been updated by now and should not reproduce this error, thanks for the heads up. :slight_smile:

    Regards,
    Andre

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.