[wp-trac] [WordPress Trac] #3775: wp_die() does not have any
formatting options which can break plugins that use AJAX.
WordPress Trac
wp-trac at lists.automattic.com
Mon Feb 12 04:23:09 GMT 2007
#3775: wp_die() does not have any formatting options which can break plugins that
use AJAX.
---------------------+------------------------------------------------------
Reporter: ajd777 | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone: 2.1.1
Component: General | Version: 2.1
Severity: normal | Keywords:
---------------------+------------------------------------------------------
Wp_die() should have a filter on outputted text because currently it
forces plugins to work around it or attempt to hackishly avoid it.
For example, if you try to submit a comment through AJAX using the built
in functions, there are many instances where wp_die() can be called, and
if wp_die() is called the returned text includes a new style sheet and
header which breaks the display of the page. Currently the only way around
this is to use Javascript to immediately check the returned data and then
parse out any error message.j
I would love to see a way to set a temporary option just before functions
are called to make it possible to disable the styled output, but a filter
would be just as effective.
As an aside, it would be nice if the formatted error message used the
theme's error page for most errors.
--
Ticket URL: <http://trac.wordpress.org/ticket/3775>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list