[wp-trac] [WordPress Trac] #41036: wp_redirect fails with error in WP 4.8
WordPress Trac
noreply at wordpress.org
Thu Jun 22 21:46:45 UTC 2017
#41036: wp_redirect fails with error in WP 4.8
-------------------------------------------------+-------------------------
Reporter: dkurth | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting
Component: Administration | Review
Severity: major | Version: 4.8
Keywords: reporter-feedback needs-patch close | Resolution:
| Focuses:
-------------------------------------------------+-------------------------
Changes (by johnbillion):
* keywords: reporter-feedback needs-patch => reporter-feedback needs-patch
close
Comment:
A redirect is just a header that gets sent to the browser. If headers have
already been sent (stated in your php warning, presumably due to all of
the html output that occurs before shortcodes in the post content are
processed) then there's no guarantee the client will respect subsequent
headers.
The fact that a redirect in a shortcodes handler ever worked in the past
is probably luck more than anything else, and probably didn't work for all
visitors to your site.
Are you calling `exit` after `wp_redirect()`?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41036#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list