WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Please help!! Blank page when accessing my site (28 posts)

  1. hitch75
    Member
    Posted 3 years ago #

    Hello!!

    I hope someone will help me with this, it's really frustrating.

    A week ago, while I was working on my website (pasatiemposparallevar.com), suddenly, when I refreshed the homepage, it was blank. When I typed the address without "www", the page appeared, but with some wrong elements (default theme background instead of the one I set up long time ago, and some more weird things). I couldn't access my admin page either, i was also getting a blank page.

    The guys from my host's support service told me it's because I had installed WordPress twice. It's true, but still, after I installed it for the second time it worked perfectly for a few months. Still, they told me I need to unistall WP and then reinstall it.

    I asked them to do it for me, so that I woudn't screw something up again. They uninstalled, installed again, imported the database backup, and the site was blank again! They told me that "database connection is fine from their end, and that there is no error in error log", so it's a WordPress problem. They tried once more, and as soon as they imported the database backup, the site was blank.

    This time i CAN access my admin page, but the site (homepage or any other) is blank. When I say blank, I mean the browser displays the address correctly, at the bottom shows "Done" but the page is empty.

    Can anyone help me?
    Thanks!!

  2. Kapil Chugh
    Member
    Posted 3 years ago #

    define these two variables in your wp-config.php file at top

    define( 'WP_DEBUG', true );

    define( 'WP_DEBUG_DISPLAY', true );

    and check on site if you get any error message on site.

  3. hitch75
    Member
    Posted 3 years ago #

    i'm new to all this... so i don't know if i did it correctly?
    i pasted these two lines in the file and i got a large list on the webpage... does it explain something??
    -------------------

    Notice: Undefined index: aiosp_enabled in /hermes/web03/b426/moo.pedja/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack.php on line 688

    Notice: Undefined index: aiosp_enabled in /hermes/web03/b426/moo.pedja/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack.php on line 688

    Notice: add_option was called with an argument that is deprecated since version 2.3 with no alternative available. in /hermes/web03/b426/moo.pedja/wp-includes/functions.php on line 3323

    Notice: add_option was called with an argument that is deprecated since version 2.3 with no alternative available. in /hermes/web03/b426/moo.pedja/wp-includes/functions.php on line 3323

    Notice: add_option was called with an argument that is deprecated since version 2.3 with no alternative available. in /hermes/web03/b426/moo.pedja/wp-includes/functions.php on line 3323

    Notice: add_option was called with an argument that is deprecated since version 2.3 with no alternative available. in /hermes/web03/b426/moo.pedja/wp-includes/functions.php on line 3323

    Notice: add_option was called with an argument that is deprecated since version 2.3 with no alternative available. in /hermes/web03/b426/moo.pedja/wp-includes/functions.php on line 3323

    Notice: add_option was called with an argument that is deprecated since version 2.3 with no alternative available. in /hermes/web03/b426/moo.pedja/wp-includes/functions.php on line 3323

    Notice: add_option was called with an argument that is deprecated since version 2.3 with no alternative available. in /hermes/web03/b426/moo.pedja/wp-includes/functions.php on line 3323

    Notice: add_option was called with an argument that is deprecated since version 2.3 with no alternative available. in /hermes/web03/b426/moo.pedja/wp-includes/functions.php on line 3323

    Notice: add_option was called with an argument that is deprecated since version 2.3 with no alternative available. in /hermes/web03/b426/moo.pedja/wp-includes/functions.php on line 3323

    Notice: add_option was called with an argument that is deprecated since version 2.3 with no alternative available. in /hermes/web03/b426/moo.pedja/wp-includes/functions.php on line 3323

    Notice: add_option was called with an argument that is deprecated since version 2.3 with no alternative available. in /hermes/web03/b426/moo.pedja/wp-includes/functions.php on line 3323

    Notice: add_option was called with an argument that is deprecated since version 2.3 with no alternative available. in /hermes/web03/b426/moo.pedja/wp-includes/functions.php on line 3323

    Notice: add_option was called with an argument that is deprecated since version 2.3 with no alternative available. in /hermes/web03/b426/moo.pedja/wp-includes/functions.php on line 3323

    Notice: add_option was called with an argument that is deprecated since version 2.3 with no alternative available. in /hermes/web03/b426/moo.pedja/wp-includes/functions.php on line 3323

    Notice: add_option was called with an argument that is deprecated since version 2.3 with no alternative available. in /hermes/web03/b426/moo.pedja/wp-includes/functions.php on line 3323

    Notice: add_option was called with an argument that is deprecated since version 2.3 with no alternative available. in /hermes/web03/b426/moo.pedja/wp-includes/functions.php on line 3323

    Notice: register_sidebar_widget is deprecated since version 2.8! Use wp_register_sidebar_widget() instead. in /hermes/web03/b426/moo.pedja/wp-includes/functions.php on line 3237

    Notice: register_widget_control is deprecated since version 2.8! Use wp_register_widget_control() instead. in /hermes/web03/b426/moo.pedja/wp-includes/functions.php on line 3237

    Notice: Undefined index: get_twitter_data in /hermes/web03/b426/moo.pedja/wp-content/themes/mystique/lib/widgets.php on line 70

    Notice: Undefined variable: userfunctions in /hermes/web03/b426/moo.pedja/wp-content/themes/mystique/lib/settings.php on line 152

  4. Try deactivating all plugins. If that resolves the issue, reactivate each one individually until you find the cause.

    If that does not resolve the issue, try switching to the Default theme (WordPress 1.5 - 2.9.2) or the Twenty Ten theme (WordPress 3.0 and higher) to rule-out a theme-specific issue.

  5. hitch75
    Member
    Posted 3 years ago #

    i would try that if i could...
    i deleted these two lines from wp-config.php file, saved it, and since then my wp-admin page is blank again too!

  6. In that case, try manually resetting your plugins. If that resolves the issue, reactivate each one individually until you find the cause.

    If that does not resolve the issue, access your server via FTP or SFTP, navigate to /wp-content/themes/ and rename the directory of your currently active theme. This which will force the Default theme (WordPress 1.5 - 2.9.2) or the Twenty Ten theme (WordPress 3.0 and higher) to activate and hopefully rule-out a theme-specific issue.

  7. hitch75
    Member
    Posted 3 years ago #

    ok, i did it. i deactivated all plugins, changed the theme, and the site showed up!
    but when i tried to revert the theme's name, and reactivated it, first time i got the message that the theme is broken, and second time it got activated, but the page went blank again.
    does that mean it's definitely the theme that's making problems?
    the theme is MYSTIQUE, many people use it.
    do you think i can try to fix it somehow or i really have to change the theme?

  8. There's definitely either a problem with your copy of Mystique, or a plugin is conflicting with it. Try deleting and re-installing the theme.

  9. hitch75
    Member
    Posted 3 years ago #

    i uninstalled it, downloaded it again, and when i tried to just PREVIEW my site with it, it showed a blank page!
    all my plugins are deactivated. (should i delete them, or deactivating is enough to make sure they're not the cause?)

    mystique theme worked fine for months before this happened... the same version as now...

  10. Deactivating the plugins should be enough, and reinstalling Mystique should have been enough too. Like you said, there are quite a few users out there without this problem.

    Can you create a fresh WordPress installation (new files and a new database) in a separate directory and see if it has the same issue with Mystique?

  11. hitch75
    Member
    Posted 3 years ago #

    i could, but what would it tell me?
    if the same error appears in a fresh installation, then it would've been happening to all other users of Mystique, and i haven't found anything about it on the net...

    do you think there could be something else, apart from plugins, that could be making a conflict with the theme somehow?

  12. I'm wondering if it's a server conflict (PHP configuration, etc.) or if it's limited to just this particular blog.

  13. hitch75
    Member
    Posted 3 years ago #

    ok, i'll try to do that!
    thanks a lot for your help :)

  14. hitch75
    Member
    Posted 3 years ago #

    i've installed wordpress in a separate directory, installed mystique, and there it works perfectly.

    does that mean that there is still something in my site that's making a conflict with Mystique? what could it be, if i've disabled the plugins? any ideas how to solve it? i wouldn't be happy if i had to change the theme... :(

  15. There's definitely a problem between Mystique and specifically your primary installation.

    Try downloading WordPress again and delete then replace your copies of everything except the /wp-content/ directory and wp-config.php file with fresh copies from the download.

  16. hitch75
    Member
    Posted 3 years ago #

    did i understand you correctly? i should NOT install wp again, just replace manually (through filezilla for example) all files and folders with the new ones? except for the ones you specified..

  17. just replace manually (through filezilla for example) all files and folders with the new ones? except for the ones you specified..

    That is correct.

  18. digitalnature
    Member
    Posted 3 years ago #

    most likely you added the wrong stuff in the user functions field from the theme settings. anything you add there is compiled as php code, and if it contains errors it will break any page.

    try this:
    - change the theme to the default one
    - open the theme's functions.php file, and at the end add:

    $s = get_option('mystique');
    $s['functions'] = '';
    update_option('mystique', $s);

    - refresh the homepage
    - go back in the dashboard and change the theme back

  19. hitch75
    Member
    Posted 3 years ago #

    thanks!!
    so i should add this to the DEFAULT theme's functions.php file?
    the file ends like this, where exactly do i have to paste it?

    <input type="button" class="button-secondary" onclick="toggleDisplay();return false;" name="pick" id="pick" value="<?php esc_attr_e('Toggle Text Display'); ?>"></input><br />
    				</form>
    			</div>
    		</div>
    	</div>
    </div>
    
    <?php } ?>
  20. digitalnature
    Member
    Posted 3 years ago #

    after the last "}", add a new line (before ?>)

  21. hitch75
    Member
    Posted 3 years ago #

    it worked!!! thanks!!

    but i'd like to know what could have been the reason?

    i DID add things to the "user functions" field.
    i was following these instructions, are they incorrect?

    1. create an ad in mystique settings > ads (ad code #2 in my example)
    2. go to advanced > user functions and paste:

    <?php
    function my_ads(){
      global $wp_query;
      if(is_home() && ($wp_query->current_post+1 == 1)) echo do_shortcode('[ad code=2]');
    }
    add_action('mystique_after_post', 'my_ads');
    ?>

    the ad code #2 will show after post #1, on the homepage only.

  22. digitalnature
    Member
    Posted 3 years ago #

    yes, the code above should work. maybe you added a extra <?php or ?> ...
    anyway, I don't recommend adding PHP code this way, I don't think it was a good idea to add this feature :)

    A better way is to create a child theme. Basically put a functions.php file into the child theme directory and inside it paste that code. It does the same thing but you can debug it easier in case of errors.

  23. hitch75
    Member
    Posted 3 years ago #

    actually, i added this one first, and then i wanted to add another ad BEFORE the first post (i wanted ads to show both before and after the first post), so i pasted this code twice :/
    i guess that was a very bad idea..

    child theme thing sounds complicated as i'm very new to wordpress...
    could you explain me how to fix the code above so that it displays "ad 2" before the first post and "ad 3" after the first post?

  24. digitalnature
    Member
    Posted 3 years ago #

    here:

    <?php
    function my_ads_after(){
      global $wp_query;
      if(is_home() && ($wp_query->current_post+1 == 1)) echo do_shortcode('[ad code=2]');
    }
    function my_ads_before(){
      global $wp_query;
      if(is_home() && ($wp_query->current_post+1 == 1)) echo do_shortcode('[ad code=3]');
    }
    add_action('mystique_after_post', 'my_ads_after');
    add_action('mystique_before_post', 'my_ads_before');
    ?>

    be careful when using that option. only use it if you know for sure that the code works. you need some basic php knowledge for that...

  25. hitch75
    Member
    Posted 3 years ago #

    Thanks A LOT for your help!!
    Your theme is beautiful, I love it.

    Thanks to James too!

  26. You're welcome! I'm glad digitalnature stopped by to provide the real solution.

  27. mikelangel001
    Member
    Posted 3 years ago #

    Hello DigitalNature this question goes to you.

    I have a blog (patataloca.net) with the theme mystique. I used the following code to put an adsense block below the first post.

    <?php
    function my_ads(){
      global $ads_already_displayed;
      if(is_home())
       if(!$ads_already_displayed){
        $ads_already_displayed = 1;
        echo do_shortcode('[ad code=1]');
       }
    } 
    
    add_action('mystique_after_post', 'my_ads');
    ?>

    So far, so perfect, but I also want to put a adsense block on post number 8 for example. What would you change or add to show me the adsense below the first post (as I had) and also in the eighth?

    Sorry if I'm not well understood, but I am Spanish and my English is not perfect.

    Thank you very much and hope you can help.

  28. writeawriting
    Member
    Posted 3 years ago #

    I tried the following (by modifying the code) to get the ads to display after post 1 and 3 and got the theme broken:
    <?php
    function my_ads_after(){
    global $wp_query;
    if(is_home() && ($wp_query->current_post+1 == 1)) echo do_shortcode('[ad code=5]');
    }
    function my_ads_after(){
    global $wp_query;
    if(is_home() && ($wp_query->current_post+1 == 1)) echo do_shortcode('[ad code=6]');
    }
    add_action('mystique_after_post', 'my_ads_after');
    add_action('mystique_before_post', 'my_ads_after');
    ?>

    My site is http://www.writeawriting.com/

    Thanks to this issue solved, I have fixed it up now but can u please tell us that how can we put in 2 ad codes in the home page, category, tag pages.

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic