uncaught SyntaxError

wordpress

#1

Hello!

I am using mobile broadband for connecting to internet. I am making WordPress theme now. I am using local server XAMPP. WP_DEBUG is working and it was not any error in theme.
If money on my account finished - browser send me to site of mobile operator.

One time I was working with theme then money finished. I working on local server and therefore I did not need internet immediately. I prolong working with theme and I see error: “uncaught SyntaxError: Unexpected token <”.
It was not this error if I activate other theme.

Then I put money and internet begin working how usual - error disappeared. If I disconnect my computer from internet - there is not error.

What it was? My theme have any mistake or not?


#2

Is this for a theme you’re making?

You’ll have to use the Chrome Inspector to find out what is causing that SyntaxError. Find out which script is causing that error.

It could be many things, right down to an internet security package that is trying to show a helpful error message when an internet resource is unavailable. You’ll just have to go through the inspector and find out where the error is and debug it that way.


#3

Manu thanks for your answer.

Yes, it is for a theme I am making.

I forgot wrote that if in file functions.php I delete this:

wp_enqueue_script( ‘theme-pinterest’, ‘//assets.pinterest.com/js/pinit.js’,array('jquery’), false, true);

  • error disappears.

I must delete this line from theme?