Forums

Warning: Cannot modify header information - headers already sent (7 posts)

  1. kelsorho
    Member
    Posted 3 months ago #

    Getting the following errors when I try to activate a plug-in. Any help would be greatly appreciated

    Warning: Cannot modify header information - headers already sent by (output started at /home/content/44/6963444/html/wp-includes/general-template.php:2101) in /home/content/44/6963444/html/wp-includes/pluggable.php on line 866

    Warning: Cannot modify header information - headers already sent by (output started at /home/content/44/6963444/html/wp-includes/general-template.php:2101) in /home/content/44/6963444/html/wp-includes/pluggable.php on line 866

    Here is what line 866 is:
    header("Location: $location", true, $status);

  2. kmessinger
    Member
    Posted 3 months ago #

  3. kelsorho
    Member
    Posted 3 months ago #

    Here is line 2101 in general-temlate.php:

    echo apply_filters( 'wp_admin_css', "<link rel='stylesheet' href='" . esc_url( wp_admin_css_uri( $file ) ) . "' type='text/css' />\n", $file );

  4. kelsorho
    Member
    Posted 3 months ago #

    If I remove that line all together, will I damage anything?

    I tried it and I haven't seen any results on the site yet, but I am afraid it will kick something down the road. But, that said, with it removed, it works.

  5. kmessinger
    Member
    Posted 3 months ago #

    If I remove that line all together, will I damage anything?

    Most likely and any future update will just put the code back in. Making changes to the core code is not recommended. BTW, your line 2101 does not match any of my lines 2101.

    What is your URL?

  6. kelsorho
    Member
    Posted 3 months ago #

  7. kmessinger
    Member
    Posted 3 months ago #

    If it is working then what can I say?

    A child theme with that file in it would prevent it from being overwritten in the future.

    BTW, I lived in GJ for about ten years long ago. You are very lucky to live where you do!

Reply

You must log in to post.

About this Topic

Tags

No tags yet.