badget

Biggest Sale! Special Offer!

Get 30% discount on all of our single themes with this coupon code: #30%SALE

Hurry up! *Limited time offer*

When I inspect my webpage I get – "Uncaught SyntaxError: Unexpected token < "

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #9508

    Hi again,

    My apologies for yet another question but I’m trying to get my website as tidy as possible. Every post or page I inspect (www.theburgernerd.com) has the same error Uncaught SyntaxError: Unexpected token < (index) :2 or sometimes it shows up the same but as (index) :1 and after a full day of researching and playing around – I can’t figure out why. I’ve tried removing all my widgets and some plugins to see if they are causing the issue, but nothing I did seem to work.

    Thanks,

    Trevor

    #9546

    Hi,

    can you share us the screenshot of that syntax error.

    Thank you.

    #9549

    Hi Theme Horse Gang,

    For some reason, the errors are only showing up on my homepage now and not posts or pages. I’m thinking now maybe it was a server issue causing it. I’m hosted by Bluehost which had an update and big crash yesterday…and now that they’re up and running again my post and page errors are gone.

    However, here are the two errors remaining that persistently show up on my Homepage.


    Uncaught ReferenceError: jQuery is not defined (index):793

    Uncaught SyntaxError: Unexpected token < ?v=1.11.0

    Line 793 looks like it is in reference to the drop down category widget in my right sidebar which is just the standard one from WordPress. Here’s what pops up when I click on line 793. Which seems odd to me because it doesn’t appear as an error on my pages or posts but only on my homepage.

    <script>
    /* <![CDATA[ */
    var dropdown = document.getElementById(“cat”);
    function onCatChange() {
    if ( dropdown.options[dropdown.selectedIndex].value > 0 ) {
    location.href = “http://www.theburgernerd.com/?cat=”+dropdown.options%5Bdropdown.selectedIndex%5D.value;
    }
    }
    dropdown.onchange = onCatChange;
    /* ]]> */
    </script>

    And in regards to the Uncaught SyntaxError: Unexpected token < ?v=1.11.0 , I’m not sure what’s causing it. These sort of things are a bit above my head. Would it have something to do with my server or the delivery of my homepage code? Here’s my homepage if you wanted to inspect it directly http://www.theburgernerd.com

    My thanks in advance for your help.

    Trevor

    #9551

    Hi,

    In regards to what I posted above. I kept doing some digging and figured out the Syntax Error was being caused by an issue with the jQuery version I was using so I was able to update it and resolve that issue. However, the Uncaught ReferenceError: jQuery is not defined (index):793 still remains…but now the line is actually showing up as 658, not 793. But it still does look like it’s in reference to the Category Widget.

    Thanks again,

    Trevor

    #9623

    Hi,

    I wanted to update this thread in case anyone else was having the same issues as I was. A plugin I had called “Infinite Scroll” was causing the Uncaught Reference Error.

    #9662

    Hi theburgernerd

    This is plugin issue not the theme issue. So you remove the plugin or you can even hire a developer to fix it out.

    Regards
    Sunil

    #9671

    Hi Sunil,

    I guess I didn’t communicate myself properly. What I was saying in my last comment is that it wasn’t a theme issue but a plugin issue and that I removed the plugin and all my code is error free. I wanted to make the above comment not to ask for further help, but did so in case anyone else was having a similar problem so that they could easily fix it by removing the plugin.

    Thanks,

    Trevor

    #9713

    Hi theburgernerd
    thankyou for your sugestion

    Regards
    Sunil

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.