BUG : URGENT : AJAX is dead ! ( Backend / FrontEnd ) Unexpected token < in JSON

Posted in: Newsmag
Post count: 5

No more ajax request could be done on Backend and FrontEnd !!!! !!

yesterday in ADS -> Sidear Ad,
– i make an HTML comment <!– –>
– Save It
– Success

And since, we cant make Ajax Request on Backend and FrontEnd !!!!

It seems that HTML comment in some form fields are not checked, and then when you make an ajax request,
JSON could not parse the data : Unexpected token < in JSON at position 0

Could you please give the DB query to update sidebar row with empty string ?

— below the console —

admin.php?page=td_theme_panel:1 Uncaught SyntaxError: Unexpected token < in JSON at position 0
at JSON.parse (<anonymous>)
at Function.n.parseJSON (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,plupload,jquery-ui-core,jquery-ui-widg…:4)
at Function.a.parseJSON (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,plupload,jquery-ui-core,jquery-ui-widg…:9)
at Object.success (td_wp_admin_panel.js?ver=3.4:666)
at i (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,plupload,jquery-ui-core,jquery-ui-widg…:2)
at Object.fireWith [as resolveWith] (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,plupload,jquery-ui-core,jquery-ui-widg…:2)
at y (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,plupload,jquery-ui-core,jquery-ui-widg…:4)
at XMLHttpRequest.c (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,plupload,jquery-ui-core,jquery-ui-widg…:4)
n.parseJSON @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,plupload,jquery-ui-core,jquery-ui-widg…:4
a.parseJSON @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,plupload,jquery-ui-core,jquery-ui-widg…:9
success @ td_wp_admin_panel.js?ver=3.4:666
i @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,plupload,jquery-ui-core,jquery-ui-widg…:2
fireWith @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,plupload,jquery-ui-core,jquery-ui-widg…:2
y @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,plupload,jquery-ui-core,jquery-ui-widg…:4
c @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,plupload,jquery-ui-core,jquery-ui-widg…:4

Post count: 5

Ok, i found the solution ( check table options ) … lost all my conf after update …
so DO NOT use <!– –> in form fields,
newsmag should check this..

Cheers

Post count: 9544

Actually, this is PHP and WordPress issue – not theme related. Comments should not be used in any data field, ever.

Welcome to WordPress !

Post count: 5

Ouch !

thanks.

To remove the comment, i have to update the DB row in which the comment is :
remove html comment tag <!– –> and update the string length
After update, ajax is alive ! cool 😉 and lost my theme config 🙁
not really a matter, i have not change a lot of properties.

Could you explain me that side effect ?

I only update one string length, perhaps it was not enough, “emergency is not your friend :)”
probably have to make a script to :
– get the row
– unserialize (http://php.net/manual/fr/function.unserialize.php)
– find comment
– serialize
– update the row

( or if you have a Do not do that with WP tuto )

Best regards

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