• Resolved PrinterPop

    (@printerpop)


    Hello,

    My site has started to randomly lead to blank pages when I attempt to log in to both admin and regular user accounts. Activating debug has shown this:

    Strict Standards: Redefining already defined constructor for class googlefonts in /home/printet1/public_html/wp-content/plugins/wp-google-fonts/google-fonts.php on line 140 Warning: Cannot modify header information – headers already sent by (output started at /home/printet1/public_html/wp-config.php:1) in /home/printet1/public_html/wp-includes/pluggable.php on line 913 Warning: Cannot modify header information – headers already sent by (output started at /home/printet1/public_html/wp-config.php:1) in /home/printet1/public_html/wp-includes/pluggable.php on line 914 Warning: Cannot modify header information – headers already sent by (output started at /home/printet1/public_html/wp-config.php:1) in /home/printet1/public_html/wp-includes/pluggable.php on line 915 Warning: Cannot modify header information – headers already sent by (output started at /home/printet1/public_html/wp-config.php:1) in /home/printet1/public_html/wp-includes/pluggable.php on line 1173

    Being new to wordpress, I have found previous forum pages outlining fixes to this error, but have found none relating to the pluggable.php. Please forgive me if the solution is obvious.

    Line 140-144 of the google-fonts.php shows:

    function __construct(){
                //Language Setup
                $locale = get_locale();
                $mo = dirname(__FILE__) . "/languages/" . $this->localizationDomain . "-".$locale.".mo";
                load_textdomain($this->localizationDomain, $mo);

    Lines 913-915 of pluggable.php have:

    setcookie($auth_cookie_name, $auth_cookie, $expire, PLUGINS_COOKIE_PATH, COOKIE_DOMAIN, $secure, true);
    	setcookie($auth_cookie_name, $auth_cookie, $expire, ADMIN_COOKIE_PATH, COOKIE_DOMAIN, $secure, true);
    	setcookie(LOGGED_IN_COOKIE, $logged_in_cookie, $expire, COOKIEPATH, COOKIE_DOMAIN, $secure_logged_in_cookie, true);

    There is nothing on line 1173. I am not sure if these lines are relevant but hopefully they will help to find a solution.

    Any and all help will be greatly appreciated.

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter PrinterPop

    (@printerpop)

    Ok, after editing the config file, the error has now changed to:

    Strict Standards: Redefining already defined constructor for class googlefonts in /home/printet1/public_html/wp-content/plugins/wp-google-fonts/google-fonts.php on line 140 Warning: Cannot modify header information – headers already sent by (output started at /home/printet1/public_html/wp-content/plugins/wp-google-fonts/google-fonts.php:140) in /home/printet1/public_html/wp-includes/pluggable.php on line 913

    Line 140 is affecting multiple lines in the pluggable.php.

    The coding on line 140-168 is:

    function __construct(){
                //Language Setup
                $locale = get_locale();
                $mo = dirname(__FILE__) . "/languages/" . $this->localizationDomain . "-".$locale.".mo";
                load_textdomain($this->localizationDomain, $mo);
    
                //"Constants" setup
                $this->thispluginurl = WP_PLUGIN_URL . '/' . dirname(plugin_basename(__FILE__)).'/';
                $this->thispluginpath = WP_PLUGIN_DIR . '/' . dirname(plugin_basename(__FILE__)).'/';
    
                //Initialize the options
                //This is REQUIRED to initialize the options when the plugin is loaded!
                $this->getOptions();
    
    			//Load the list of fonts from the Google API or local cache
                $this->gf_fonts = get_option($this->gf_data_option_name);
    
    			//Convert the options from pre v3.0 array
    			$this->gf_convert_fonts();
    
                //Actions
                add_action("admin_menu", array(&$this,"admin_menu_link"));
                add_action('admin_enqueue_scripts',array(&$this,'gf_admin_scripts'));
    
    			add_action('wp_enqueue_scripts',array(&$this, 'googlefontsstart'));
    			add_action("wp_head", array(&$this,"addgooglefontscss")); 
    
    			add_action('wp_ajax_googlefont_action', array($this, 'googlefont_action_callback'));
            }

    Any advice on how to fix this? I feel I’m a bit out of my league on this one.

    Also, thank you very much for the link, it was helpful in understanding more about the issue.

    Thread Starter PrinterPop

    (@printerpop)

    Solved the problem!

    For others’ reference:

    https://www.ads-software.com/support/topic/error-message-on-wp-google-fonts-plugin-activation-with-wp-version-371?replies=2

    Thank you very much for your help, it definitely made working through this problem easier.

    I fixed this by removing

    <?php flush(); ?>

    from my header.php file

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Cannot modify header information – pluggable.php’ is closed to new replies.