Unexpected Token Error

Posted in: Newsmag
Post count: 7

Hi,
I get this error in the Chrome console for survivalreport.org. I use WP Rocket and contacted their support team for help with this issue. This is what they had to say:

And why do I get a Uncaught SyntaxError: Unexpected token : (index):1 error in the console (I also asked this in the previous email).

I mentioned that above, that it could be caused by theme or some other part of your system. What could be the reason, is, if you set the background image with bad path, or did some other part in Theme options that is not expected by the backend, that could trigger the problem. I’d be more than happy to hear theme developers input on that. I have narrowed it down to this piece of code:

<script type=”text/javascript”>
{“@context”:”http:\/\/schema.org”,”@type”:”WebSite”,”@id”:”#website”,”url”:”https:\/\/survivalreport.org\/”,”name”:”Survival Report”,”potentialAction”:{“@type”:”SearchAction”,”target”:”https:\/\/survivalreport.org\/?s={search_term_string}”,”query-input”:”required name=search_term_string”}}
</script>

There is a problem in unexpected token “:” in this code. Which one exactly, I am not sure.

Please help.
Thanks

Post count: 23312

Hello miket,

Please keep in mind that by default, the theme does not have this kind of error. Ensure that you are using the latest theme version, use only the tested plugins which come bundled with the theme core files, clear all the caches and check the results. If the problem is still there, you should make a new clean install from scratch via FTP way and re-install the theme and check the results.

Hope this helps and let us know how it goes!

Thanks for the message!

Post count: 7

Actually, on posts such as https://survivalreport.org/resilience/ I get the following error:
Uncaught SyntaxError: Unexpected token : (index):10
The only active plugins are:

  • Contact Form 7
  • Tag Div Social Counter
  • Tag Div Speed Booster
  • WPBakery Visual Composer

WP Rocket is deactivated, browser cache cleared, Cloudflare cache cleared, DNS dlushed, post opened in incognito window.

Kindly let me know if you can offer support. I can’t screw around, if you don’t I’ll gladly buy another theme and try to forget this happened.

Cheers.

Post count: 23312

Hello miket,

I have nspected your website and I saw that you are using other untested plugins and you have not deactivated them, as you can see here -> https://www.screencast.com/t/2UH3nLOMUCx
Why do you not respected our list of recommended and tested plugins?
Please keep in mind that the only tested and recommended plugins to use with our theme are these ones:
Tested Plugins:

WP Super Cache- caching plugin
Contact form 7- used to make contact forms
bb press- forum plugin
BuddyPress- social network plugin
Font Awesome 4 Menus- icon pack, supported in the theme menus
Jetpack- plugin with lots of features *it may slow down your site
WooCommerce- eCommerce solution
WordPress (Yoast) SEO- SEO plugin
Wp User Avatar- Change users avatars

Anything beyond this list is not tested and I cannot say for sure if it will work or not.

Also, I have noticed that you are using a child theme. Most likely, you have some syntax error through it and that’s it is possible to get this error. Try to switch the theme to the main mode, clear all the caches and check the results.

Thanks.

Post count: 7

Thanks for making me jump through hoops.

I deactivated the child theme. I deactivated all the plugins besides tagdiv plugins and Visual Composer. I cleared the browser cache and Cloudflare cache. I still get the error.

I have other work to do, so I cannot wait until you decide if you’re going to inspect the site or not and I will reactivate some of the inactive plugins. Now, please let me know if you need the WordPress credentials to take a look at it or kindly offer a refund so I can look somewhere else.

Thanks

Thanks.

Post count: 23312

Hello miket,

Please send us an email at contact@tagdiv.com with your log-in information (wp-admin) so we can further inspect it closer your setup page. Provide there the link to this topic so we can quickly identify you.

Thanks.

Viewing 6 posts - 1 through 6 (of 6 total)
The forum ‘Newsmag’ is closed to new topics and replies.