Jump to content


Editing: Unexpected token < in JSON at position 0


  • Please log in to reply
1 reply to this topic

#1 vasco

vasco

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 05 June 2019 - 03:55 AM

Hi everyone. I can´t update any row, keep having this error in Chrome Console (No error on html front, just nothing happen). I can add new rows, same as delete them. But with Edit/Clone, I can figure what is going wrong.

 

Full error msg:

 

Uncaught SyntaxError: Unexpected token < in JSON at position 0
    at Function.parse [as parseJSON] (<anonymous>)
    at Object.success (edit.js:37)
    at Object.b.success (global-libs.min.js:7)
    at c (jquery-1.11.1.min.js:264)
    at Object.fireWith [as resolveWith] (jquery-1.11.1.min.js:266)
    at l (jquery-1.11.1.min.js:659)
    at XMLHttpRequest.<anonymous> (jquery-1.11.1.min.js:665)

I´ve checked on network to see what is recieving the server and the info is correct.

 

Thanks in advance!



#2 karlochev

karlochev

    Newbie

  • Members
  • Pip
  • 2 posts
  • LocationDeath Star - (Some calls it "Ecuador")

Posted 21 June 2019 - 04:18 PM

Hi,

 

I solved it by changing "<" to "& lt;" and ">" and other special characters, for their corresponding html character. The message returned must be simple text. You can verify it by changing the return on the function: "insert_layout" in the library Grocery_CRUD.php.

 

 

Hi everyone. I can´t update any row, keep having this error in Chrome Console (No error on html front, just nothing happen). I can add new rows, same as delete them. But with Edit/Clone, I can figure what is going wrong.

 

Full error msg:

 

Uncaught SyntaxError: Unexpected token < in JSON at position 0
    at Function.parse [as parseJSON] (<anonymous>)
    at Object.success (edit.js:37)
    at Object.b.success (global-libs.min.js:7)
    at c (jquery-1.11.1.min.js:264)
    at Object.fireWith [as resolveWith] (jquery-1.11.1.min.js:266)
    at l (jquery-1.11.1.min.js:659)
    at XMLHttpRequest.<anonymous> (jquery-1.11.1.min.js:665)

I´ve checked on network to see what is recieving the server and the info is correct.

 

Thanks in advance!






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users