WordPress.org

Support

Support » Plugins and Hacks » GC Testimonials » Blank home page when plugin is activated

Blank home page when plugin is activated

  • Nick

    @tolputtkeeton

    Trying out the plugin, but when activated, I get a blank page after the header file ends.

    At first, I thought it was conflicting with another testimonial plugin, but after deactivating that, I still got the blank page.

    Using a custom theme based on the 2012 theme. But seems odd that it doesn’t load anything in the index.php file, and anything after that. No errors are displayed. Not doing anything out of the ordinary, only pulling in some post requests using wordpress functions for the home page.

    Any ideas on why this is happening?

    Thanks.

    https://wordpress.org/plugins/gc-testimonials/

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

    @tolputtkeeton

    Replicated the site to a test server to help solve the problem, like de-activating and re-activate other plugins one by one, default theme etc…and i cant replicate the problem, but yet it exists on the live site…which is really annoying as it doesn’t help in trying to find a potential problem.

    Any ideas are welcome!

    Whenever I get a blank page it’s usually due to a PHP error. Try turning on debug mode in your wp-config.php by setting

    define('WP_DEBUG', false);

    to

    define('WP_DEBUG', true);

    and see what that reports.

    Also try the Developer plugin.

    Nick

    @tolputtkeeton

    Thanks.

    To confuse matters some more. I get a few errors with the WP_DEBUG on true, but only one that’s associated with this plugin. However, that only appears on the admin panel and not the front end:

    Notice: Use of undefined constant KCVT_URL – assumed ‘KCVT_URL’ in /……./wp-content/plugins/gc-testimonials/testimonials.php on line 946

    The plugin has a few non-fatal errors and the developer is aware of them.

    (1) The fact that an identical installation works on another server indicates a difference in PHP or MySQL configurations. Do you know how to run phpinfo()? If so, look for differences in the two PHP configs. If not, I can walk you through it.

    (2) I assume you’re looking at the source code of the blank page. When you say you “get a blank page after the header file ends,” are you referring to header.php? So the basic structure of the blank page is like

    <html>
    <head>
    <title></title>
    <link this>
    <script that>
    </head>
    <body class="home">
    <div id="page">
      <header>
        <nav id="site-navigation">...</nav>
      </header>
      <div id="main">

    and ends before any content <div>‘s?

    Nick

    @tolputtkeeton

    Run the phpinfo(); but cant see any differences between the 2 – is there anything specific to look for that might affect this?

    As for the blank page after the header, yeah how you described it.

    The browser renders everything up until the end of header.php
    After that, nothing is displayed – in either the browser or the source code. Just stops at the last tag in the header.php which is <div id=”main”>, the opening tag for the main content.

    Hello sir,
    I want to show GCtestimonial categories-wise
    Any suggestion ?

    sibasish, please open a new thread.

    Nick, I thought if there was a glaring difference between the 2 phpinfo’s we would have a place to look for culprits. I’ve seen overly strict mysql modes prevent inserting/updating records with zeroes in the dates, for example.

    So upon activation, every page is blank or just when using the plugin’s shortcode or widget?

    Please post the code of your page template and the shortcode or widget settings you’re using.

    Nick

    @tolputtkeeton

    Blank pages upon plugin activation.

    Have pasted the first part of the home page here: http://pastebin.com/UqmdyYmS

    The plugin settings will be on default, no shortcode or widgets will be used with this plugin as it causes the break on activation.

    Not had any problems like this with any other plugins.

    Yep, this is really odd. Aside from the non-fatal errors and some CSS conflicts, the plugin itself is very simple and really plays well with others.

    I should have asked this sooner: What happens on a default theme like TwentyTwelve?

    Looking at your code, I think you should consider this from http://codex.wordpress.org/Function_Reference/query_posts:

    Note: This function isn’t meant to be used by plugins or themes.

    Double Note: query_posts() is overly simplistic and problematic

    It… will outright fail in some circumstances

    Any modern WP code should use more reliable methods

    TL;DR don’t use query_posts() ever

    Nick

    @tolputtkeeton

    Ok thanks. You reckon this might be causing the issue?

    What do you suggest to use instead?

    get_pages, get_posts, or my favorite WP_Query

    Nick

    @tolputtkeeton

    Ok thanks. Will look into them and get the code updated 🙂

    Nick, any progress on this? Need any help?

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Blank home page when plugin is activated’ is closed to new replies.
Skip to toolbar