WordPress.org

Ready to get started?Download WordPress

Forums

WordPress SEO by Yoast
Compatibility issue (15 posts)

  1. ProImpactLLC
    Member
    Posted 1 year ago #

    WordPress by Yoast version 1.3.4.4
    Clean install of WordPress 3.5 and using Version 1.1 of Twenty Twelve. NO other plugins installed.

    Downloaded WordPress SEO plugin from the Add-new Plugins Screen in WordPress. Activated Plugin and received the following error message.

    Warning: Cannot modify header information - headers already sent by (output started at /home/proimpac/public_html/test/wp-admin/includes/template.php:1642) in /home/proimpac/public_html/test/wp-includes/pluggable.php on line 876

    This is not the first time that I have received this error message but it has just started. So, I sent a message to host provider and here is what they replied:
    Since this seems to be occuring on all new installations, I sent a message to my hosting service and they replied:

    Your template sends the headers in the file + line
    /home/proimpac/public_html/test/wp-admin/includes/template.php:1642 (second line in the putted code "<html") #### <!--[if IE 8]>
    <html xmlns="http://www.w3.org/1999/xhtml"
    class="ie8 <?php echo $admin_html_class; ?>" <?php do_action('admin_xml_ns'); ?> <?php language_attributes(); ?>>
    <![endif]--> <!--[if !(IE 8) ]><!--> <html xmlns="http://www.w3.org/1999/xhtml" class="<?php echo $admin_html_class; ?>" <?php do_action('admin_xml_ns'); ?> <?php language_attributes(); ?>>
    <!--<![endif]--> ####

    Then the wordpress file
    /home/proimpac/public_html/test/wp-includes/pluggable.php tries to send the headers again in line 876:

    ####

    header("Location: $location", true, $status); ####

    So, you have this error because your scripts try to send
    the headers info twice. You can try to remove the lines from the first script
    (can't say if your template will work correct after that, so I advise you to
    save the copy of it) and check the web site. Or you can try with some default template.

    Please get back to us if you need any further assistance
    and let us know how else we can help.
    -------------------
    At first, the host provider thought it had to do with Weaver Pro 1.2.7 but that is not the case since I'm using a clean install and the default Twenty Twelve Theme with no additional plugins!
    The test site can be seen at http://www.test.proimpactllc.com

    This just started, so something has changed recently...

    http://wordpress.org/extend/plugins/wordpress-seo/

  2. ProImpactLLC
    Member
    Posted 1 year ago #

    As an update.. I downloaded an older version (1.2.8.7)from Yoast.com and this does NOT create a conflict. So it does have something to do with the latest version.

  3. nemof
    Member
    Posted 1 year ago #

    any fix yet for the latest version? I have the same message. I could downgrade but I'd rather see it fixed.

  4. RandyKing
    Member
    Posted 1 year ago #

  5. ProImpactLLC
    Member
    Posted 1 year ago #

    RandyKing,
    You were correct in that there were 2 missing characters in the plugable.php and I was able to sucessfully add the remaining code (verified no other space or characters before or after the last 2 characters). however, I still receive the following warning:

    Warning: Cannot modify header information - headers already sent by (output started at /home/dockmast/public_html/wp-admin/includes/template.php:1642) in /home/dockmast/public_html/wp-includes/pluggable.php on line 876

    thanks for you attention.

  6. RandyKing
    Member
    Posted 1 year ago #

    OK, now look in template.php for whitespace before the opening PHP declaration. If you go back to the post I cited above at http://wordpress.org/support/topic/yoast-seo-plugin-causing-my-website-to-break?replies=2, you will see where Callie actually got hers to work editing template.php.

  7. ProImpactLLC
    Member
    Posted 1 year ago #

    RandyKing,
    I have 2 template.php files on the server. One in public_html/wp-admin/includes and the other, public_html/wp-includes. I opened both with the cPanel Code Editor and there was no white space before the opening commands. However, what I did find in both files is that there was no ending command ?> in either file. The version /home/dockmast/public_html/wp-includes/template.php only goes to line 410 and ended like this:

    */
    function load_template( $_template_file, $require_once = true ) {
    	global $posts, $post, $wp_did_header, $wp_query, $wp_rewrite, $wpdb, $wp_version, $wp, $id, $comment, $user_ID;
    
    	if ( is_array( $wp_query->query_vars ) )
    		extract( $wp_query->query_vars, EXTR_SKIP );
    
    	if ( $require_once )
    		require_once( $_template_file );
    	else
    		require( $_template_file );
    }
    
    I added ?> to see if closing the code would work, it did not.  I did save which overwrote the original code.  No FTP.
    
    The second version: /home/dockmast/public_html/wp-admin/includes/template.php is ended at 1867 like this:
    function convert_to_screen( $hook_name ) {
    	if ( ! class_exists( 'WP_Screen' ) ) {
    		_doing_it_wrong( 'convert_to_screen(), add_meta_box()', __( "Likely direct inclusion of wp-admin/includes/template.php in order to use add_meta_box(). This is very wrong. Hook the add_meta_box() call into the add_meta_boxes action instead." ), '3.3' );
    		return (object) array( 'id' => '_invalid', 'base' => '_are_belong_to_us' );
    	}
    
    	return WP_Screen::get( $hook_name );
    }

    [Please post code or markup snippets between backticks or use the code button. Or better still - use a pastebin. Your posted code may now have been permanently damaged/corrupted by the forum's parser.]

    And again did not have the closing ?>. So I added and saved. No luck.

    In both cases, neither file showed empty spaces or lines before the opening code.

    I also rechecked my pluggable.php to make sure the changes did save from yesterday, and they did...

    I really appreciate you helping us out with this.

  8. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    No! Never, ever, edit WordPress core scripts including those in files in the wp-includes & wp-admin folders. And do not encourage others to do so. Editing core scripts can bring down your entire site and/or open security holes for hackers to use.

  9. ProImpactLLC
    Member
    Posted 1 year ago #

    Not to sound rude and out of frustration.... I guess if WP would fix the code, we wouldn't be monkeying with it. This has been broken for a while.

  10. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    WordPress core is not "fixed" to suit plugins. It's the other way around.

  11. RandyKing
    Member
    Posted 1 year ago #

    All I can say in response to this is that I did a bunch of research on this, and all of the results pointed to (a) recent releases of WordPress and (b) they were all concerned with removing white space and/or closing the PHP declaration.

    Having said that, Esmi brings up a good point that I fundamentally agree with - messing with the WP core can cause other things to break and even if something does not look like it is "closed out" in one file, doesn't mean it's coded improperly either. It may be that it's closed out in a companion file after other file includes. Still, the fix that worked for me closing out the PHP declaration in pluggable.php eliminated the problem and didn't seem to cause any others.

    The bottom line is that all of a sudden there's a rash of breakages due to this same problem and while it is academically correct to have it fixed "the right way", we're really not sure what that is at this point, and there are websites going offline because of it.

  12. RandyKing
    Member
    Posted 1 year ago #

    ProImpactLLC, I don't know what to tell you about your problem. I shared what fixed mine, and it was related to installing the Yoast SEO pack on a virgin load of WP 3.5.1. Take heed to what Esmi is saying above, and don't start cranking on the WP core too much.

    Joost de Valk has not weighed in on any of this that I can see - perhaps he is looking at the problem and will let us know what his opinion of the problem is. And I would bet that the WP core folks are also looking to see if something got tinkered with at their end as well.

  13. JochenT
    Member
    Posted 1 year ago #

    Please see post http://wordpress.org/support/topic/yoast-seo-plugin-causing-my-website-to-break?replies=11#post-3833404 for a typical explanation for these kind of error messages. There is no error in the WordPress core. Also the core code is unchanged since WP 3.4 at least.

  14. Bob0221
    Member
    Posted 1 year ago #

    I am having the same issue with the Warning: Cannot modify header information. I followed all of the steps outlined in the 2 referenced threads and it did not resolve the problem.

    All I know is that Version 1.2.8.7 works with WP 3.5.1 and version 1.3.4.4 does not because it creates warnings and breaks.

  15. Plippers
    Member
    Posted 1 year ago #

    I installed a fresh install of 3.5.1 and Yoast 1.3.4.4 and got the same error after activating the plug. :(

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic