Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

Jquery Error Uncaught SyntaxError: Unexpected token >

Hi,

When I try to open tickets, the loading bar freezes at around 75% with grayed overlay. By inspecting the chrome console I noticed that the following error prevent the page load. I tried using different browsers and it occurs among all browsers.

This is affecting the business at the moment so appreciate if somebody can show me the direction to sort this out.

VM6965:1 Uncaught SyntaxError: Unexpected token >
    at eval (<anonymous>)
    at jquery-1.8.3.min.js:2
    at Function.globalEval (jquery-1.8.3.min.js:2)
    at HTMLScriptElement.<anonymous> (jquery-1.8.3.min.js:2)
    at Function.each (jquery-1.8.3.min.js:2)
    at init.domManip (jquery-1.8.3.min.js:2)
    at init.append (jquery-1.8.3.min.js:2)
    at init.<anonymous> (jquery-1.8.3.min.js:2)
    at Function.access (jquery-1.8.3.min.js:2)
    at init.html (jquery-1.8.3.min.js:2)

This is the section that the debugger displays. Red-colored is the section it says there is an error.

/* <![CDATA[ */(function(d,s,a,i,j,r,l,m,t){try{l=d.getElementsByTagName('a');t=d.createElement('textarea');for(i=0;l.length-i;i++){try{a=l[i].href;s=a.indexOf('/cdn-cgi/l/email-protection');m=a.length;if(a&&s>-1&&m>28){j=28+s;s='';if(j<m){r='0x'+a.substr(j,2)|0;for(j+=2;j<m&&a.charAt(j)!='X';j+=2)s+='%'+('0'+('0x'+a.substr(j,2)^r).toString(16)).slice(-2);j++;s=decodeURIComponent(s)+a.substr(j,m-j)}t.innerHTML=s.replace(/</g,'&lt;').replace(></m>/g,'&gt;');l[i].href='mailto:'+t.value}}catch(e){}}}catch(e){}})(document);/* ]]> */

I am using OsTicket V1.9.15 this issue started from the V1.9.14. I thought the version upgrade will address the issue but it still persists after the upgrade.

Thanks in advance!
Tagged:

Comments

  • Just figured out that when I click the refresh button of the frozen page it loads without any errors. I notice the code with error changes when I hit refresh.

    When open : replace(></m>/g,'&gt;');l[i].href='mailto:'+t.value}}catch(e){}}}catch(e){}})(document);/* ]]> */
    After refresh : replace(/>/g,'&gt;');l[i].href='mailto:'+t.value}}catch(e){}}}catch(e){}})(document);/* ]]> */


    And this <![CDATA section can be found(just before </body>) only on some tickets. Tickets without this piece of code work fine.

    Waiting for some help....
Sign In or Register to comment.