[wp-trac] [WordPress Trac] #52725: WP5.7-RC2-50494 Warning: Cannot modify header information
WordPress Trac
noreply at wordpress.org
Fri Mar 5 21:01:40 UTC 2021
#52725: WP5.7-RC2-50494 Warning: Cannot modify header information
-------------------------------+------------------------------
Reporter: mitfi | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Administration | Version: trunk
Severity: normal | Resolution:
Keywords: reporter-feedback | Focuses: administration
-------------------------------+------------------------------
Comment (by mitfi):
Replying to [comment:2 hellofromTonya]:
Hello @hellofromtonya,
thanks for your response.
I can reassure that my plug-in works under 5.6.2 but not under 5.7.
There is no (not willingly) output generated prior redirect in this case.
The code „Emergency Management“ is available in trac under
https://plugins.trac.wordpress.org/browser/emergency-management/
Best regards
Michael
> Hello @mitfi,
>
> Welcome to WordPress Core Trac. Thank you for your ticket!
>
> >However, a call to mfem-warning-saltsform-handler-pre, with some
activity done there (regardless whether I do a screen output or not) and a
redirect to "admin.php?page=mfem-emergency-management", will fail with the
above warning as soon as the redirect is executed.
>
> - Can you share the redirect code in the
`mfem_warning_saltsform_handler_pre` callback?
>
> I attempted to reproduce the problem using the code in the description
as well as adding this redirect in that callback:
>
> {{{#!php
> <?php
> function mfem_warning_saltsform_handler_pre() {
> wp_redirect( admin_url( 'users.php?page=mfem-emergency-management'
) );
> }
> }}}
>
>
> Navigating to the sub page, the `Warning: Cannot modify header
information` appeared on both WP 5.6.2 and 5.7 RC2.
>
> - Also, can you share the enter warning back grabbing a screenshot?
> Why? The callstack in the PHP warning information can help with further
investigation.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/52725#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list