• Здравствуйте!
    У меня такая вот проблема: после установки и активации плагина WordPress SEO by Yoast Версия 1.3.4.4 версия вордпресс 3.5 появилось сообщение:

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

    В частозадаваемых вопросах и ответах нашел только http://codex.wordpress.org/%D0%A7%D0%90%D0%92%D0%9E/Cannot_modify_header_information и сделал следующее:

    Файл template.php я скачал через фтп, лишних строк там необнаружил, сохранил в UTF-8 без BOM (редактор Notepad++) но проблема неисчезла.
    Вот кусок кода на который ссылается сообщение:

    <!DOCTYPE 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]-->

    Это та самая 1642 строчка (выше она 3-я)
    <html xmlns="http://www.w3.org/1999/xhtml" class="ie8 <?php echo $admin_html_class; ?>" <?php do_action('admin_xml_ns'); ?> <?php language_attributes(); ?>>

    Подскажите пожалуйста, в чем загвоздка и как исправить.
    Спасибо!

Просмотр 2 ответов — с 1 по 2 (всего 2)
  • а в /home/tou/domains/sait.ru/public_html/wp-includes/pluggable.php on line 876 что находится?

    В pluggable.php строка 876
    header("Location: $location", true, $status);
    а это кусок кода из которого она (3-я снизу)

    function wp_redirect($location, $status = 302) {
    	global $is_IIS;
    
    	$location = apply_filters('wp_redirect', $location, $status);
    	$status = apply_filters('wp_redirect_status', $status, $location);
    
    	if ( !$location ) // allows the wp_redirect filter to cancel a redirect
    		return false;
    
    	$location = wp_sanitize_redirect($location);
    
    	if ( !$is_IIS && php_sapi_name() != 'cgi-fcgi' )
    		status_header($status); // This causes problems on IIS and some FastCGI setups
    
    	header("Location: $location", true, $status);
    }
    endif;

Просмотр 2 ответов — с 1 по 2 (всего 2)
  • Тема «WordPress SEO by Yoast» закрыта для новых ответов.