• Resolved BUFU1610

    (@bufu1610)


    Hey there!
    Whenever we have the WPSSO plugin’s free version activated, we cannot preview any posts. We get a blank page with only “2travellers2travellers” shown (That’s the title of our blog).
    When deactivated, the preview works fine.

    Does/did anyone have the same problem and knows anything about it? Or even has a solution to this?

    Help would greatly be appreciated!
    Thanks,
    BUFU

    https://ww.wp.xz.cn/plugins/wpsso/

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Author JS Morisset

    (@jsmoriss)

    Sounds like WPSSO might be triggering a bug in another plugin or your theme. Have you tried enabling WP_DEBUG to get the error message? See here for more info: http://wpsso.com/codex/plugins/wpsso/installation/debugging-and-problem-solving/

    js.

    Plugin Author JS Morisset

    (@jsmoriss)

    Any update on this?

    js.

    Plugin Author JS Morisset

    (@jsmoriss)

    It’s been 5 days, so I’ll assume you’ve found a solutions.

    js.

    Thread Starter BUFU1610

    (@bufu1610)

    Hello again.

    You assumed wrongly. It’s just that not everyone’s lives revolve only around WP plugins.

    So, I did log the debug messages: http://2travellers.de/wp-content/debug.log
    Is there anything in there that shows you what might cause the problem?

    I just get a blank page with “2traveller2travellers” on it. That’s it.

    Thanks for your help in advance.

    Thread Starter BUFU1610

    (@bufu1610)

    Oh, and I checked back by deactivating all other plugins (the theme has one slider plugin which cannot be deactivated, but all the others were) and it still blocks the preview… :/
    My theme is Frida by Burnhambox, if it’s any help.

    Plugin Author JS Morisset

    (@jsmoriss)

    This might cause an empty page:

    [16-Jan-2016 05:53:45 UTC] PHP Warning: Cannot modify header information – headers already sent by (output started at /customers/6/b/e/2travellers.de/httpd.www/wp-includes/general-template.php:598) in /customers/6/b/e/2travellers.de/httpd.www/wp-includes/pluggable.php on line 1228

    I would have expected another error somewhere. There are no errors in the log files? When you get the blank page, if you do a “View Source”, is there nothing?

    js.

    Thread Starter BUFU1610

    (@bufu1610)

    Hello again.
    The source seems to be the complete page, but starting with

    2travellers2travellers<!DOCTYPE html>
    <!--[if IE 8]>

    After that the page seems to be complete in the source, but this line is blocking everything else from showing. Only the starting “2travellers2travellers” is displayed and nothing more.

    The logfile I linked is the complete log. There is nothing more than this.

    Thanks again,

    BUFU

    Thread Starter BUFU1610

    (@bufu1610)

    I have to take back everything I wrote in the answer before. It happened when I first checked, but now I wanted to confirm and now the source only says
    2travellers2travellers
    That is literally everything there is in the source.
    And it doesn’t matter what kind of post I try, they all just have that.

    Any idea how that might happen?

    BUFU

    Plugin Author JS Morisset

    (@jsmoriss)

    “2travellers” is your site name, right? I would guess an incorrectly coded wp_title / the_title filter which is echo’ing its value instead of returning it. Title filters are usually hooked by themes and SEO plugins, so you should look at those two first.

    js.

    Thread Starter BUFU1610

    (@bufu1610)

    Hey there!

    I just tested around with the titles and found that the preview works again when I leave the title field empty under “Settings > General”.

    So, this solves the problem (apparently) for me, but shouldn’t be a problem in the first place in my opinion.

    Thank you for the hints,
    BUFU

    Plugin Author JS Morisset

    (@jsmoriss)

    No, it shouldn’t be a problem, obviously. You have fixed the issue because the badly coded filter you have now has nothing to print. A better solution would be to fix that badly coded filter. As I said earlier, it would probably be in your theme or an SEO plugin you use (though any SEO plugin author would probably not make such a basic coding error).

    js.

    Thread Starter BUFU1610

    (@bufu1610)

    So, I plowed through everything now that I have time for this and I found that a wp_title filter in my theme’s functions.php caused the problem. Here is the code:

    function brnhmbx_wp_title( $title, $sep ) {
    	if ( is_feed() ) {
    		return $title;
    	}
    
    	global $page, $paged;
    
    	// Add the blog name
    	if ( !is_customize_preview() ) {
    		$title .= bloginfo( 'name', 'display' );
    	}
    
    	// Add the blog description for the home/front page.
    	$site_description = get_bloginfo( 'description', 'display' );
    
    	if ( $site_description && ( is_home() || is_front_page() ) ) {
    		$title .= esc_html( " $sep $site_description" );
    	}
    
    	return $title;
    
    }
    add_filter( 'wp_title', 'brnhmbx_wp_title', 10, 2 );

    Is it the fact that they used bloginfo() in the blog name part instead of get_gloginfo()?

    BUFU

    Plugin Author JS Morisset

    (@jsmoriss)

    bloginfo() echos it’s text, it does not return it:

    https://developer.ww.wp.xz.cn/reference/functions/bloginfo/

    So this line is invalid:

    $title .= bloginfo( ‘name’, ‘display’ );

    js.

    Thread Starter BUFU1610

    (@bufu1610)

    Thanks, got to the same conclusion. Thank you very much!

    Plugin Author JS Morisset

    (@jsmoriss)

    No problem. šŸ˜‰

    BTW, if you have a minute and value WPSSO and its support, would you take a moment to rate the plugin at https://ww.wp.xz.cn/support/view/plugin-reviews/wpsso? A good review is always a great way to encourage us. šŸ˜‰

    Thanks,

    js.

Viewing 15 replies - 1 through 15 (of 15 total)

The topic ‘Empty page in preview’ is closed to new replies.