This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

Google maps throws error

7 years ago · Last reply by Alex S 7 years ago

Hey, trying to insert a google maps widget into my site throws an error in the console as follows:

SyntaxError: expected expression, got '<'

investigating the problem file its source is as follows:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html><head>
<title>Menu for /school/wp-content/plugins/so-widgets-bundle/js/sow.google.map.min.js</title>
</head><body>
<h1>Menu for /school/wp-content/plugins/so-widgets-bundle/js/sow.google.map.min.js</h1>
<hr />
<pre>          <a href="https://backchanneltool.com/school/wp-content/plugins/so-widgets-bundle/js/soGoogleMapInitialize()%7bnew">soGoogleMapInitialize(){new</a></pre>
</body>
</html>

I have a valid maps API key that works with other widgets
I tried deactivating and then fully deleting and reinstalling the widgets bundle
I tried deactivating other widget-related plugins that might be interfering but I’m not sure what might be causing this or what to do about it.

This is our free support forum. Replies can take several days.

Need fast email support? Get SiteOrigin Premium

Replies

2
  1. gnawoodworks 7 years, 9 months ago

    I have solved the issue. It was related to my server host’s configuration serving the sow.google.maps.min.js file incorrectly. I had to set the .htaccess file to force .js files as application/javascript with the forcehandler directive, trying to merely addtype was not enough.

  2. Alex S Staff 7 years, 9 months ago

    Hi Gnawoodworks,

    I’m glad you were able to resolve this issue. I’m sorry I wasn’t able to be of assistance this time. Please be sure to post another thread if you have any other questions.

Replies on this thread are closed.

Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Have a different question or issue?

Start New Thread