[wp-trac] [WordPress Trac] #15291: receiving data with response from ajax call
WordPress Trac
wp-trac at lists.automattic.com
Wed Nov 3 16:58:47 UTC 2010
#15291: receiving data with response from ajax call
-----------------------------+----------------------------------------------
Reporter: christian_gnoth | Owner:
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 3.1
Component: General | Version: 3.0.1
Severity: normal | Resolution:
Keywords: ajax,response |
-----------------------------+----------------------------------------------
Changes (by christian_gnoth):
* component: Inline Docs => General
Comment:
I took a look in the admin-ajax.php - indeed the problem is not with
wordpress as there is only the hook called which is defined in the plugin
and then it dies with 0 or -1.
out of some reason my wp_insert_post in the ajax function creates a error
message, that the mysql_real_escape function expects the parameter 1 as
string in wp-includes/wp-db.php line 785.
And on this message the returned value from the die() function is
appended.
with that it is difficult to work.
the whole string is not returned in the data variable of the success(data,
responseText, XhttpRequestObj) callback function, but in the
'responseText' key of the XhttpRequestObj variable.
if I use the WP_Ajax_Response class I do not get any response from the
jQuery.post call.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15291#comment:13>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list