Notice: This thread is over two years old; the information may be outdated. Please consider creating a new thread if you require free support. If you have an active SiteOrigin Premium license, you can email our premium support desk at [email protected].
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.
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.
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.