Support » Fixing WordPress » All WP admin pages and login are blank

Viewing 9 replies - 1 through 9 (of 9 total)
  • corrinarusso

    (@corrinarusso)

    Clearly you have a syntax or logical error somewhere.
    You could look at your servers logs to get the actual error message.

    – download all the files from your child theme under /handmade-shop-child
    – remove the child theme completely from your computer
    – re-create your child theme using the minimum requirements :
    https://developer.wordpress.org/themes/advanced-topics/child-themes/#how-to-create-a-child-theme
    – add the functionality and templates back into the child theme one by one (until it errors)
    – triple check your functions.php file is formatted properly, and has no syntax or logical errors in your code

    Thread Starter Handyann

    (@handyann)

    Hi and thank you so much for coming back to me so fast.
    Can I post the contents of the functions.php file here, if you wouldn’t mind taking a look? I wouldn’t know if there’s an error there, although nothing has been thrown up in the c-panel file editor.

    Thread Starter Handyann

    (@handyann)

    Oh, and I don’t know where to go for the server logs, unless it’s the error file in the WP files? I did look at that yesterday and, rather oddly, the only error it shows is apparently from June 8th 2019. That seems a bit of a coincidence to me! I can post the 3 entries, if that would help?

    corrinarusso

    (@corrinarusso)

    Yes you can post the contents of the functions file here.

    You need to login to your control panel, and search for Logs. Or ask your host.
    Hope you’re working on a development site, and not production!

    Thread Starter Handyann

    (@handyann)

    Brilliant! Thank you. The site is my own newish shop site – luckily not for anyone else. It is live though, so I’ll have to put it on maintenance mode to do anything that shows from the front end. It was all working fine until yesterday 🙁

    Here’s the contents of the functions.php file from the child theme:

    <?php
    /**
    * @package WordPress
    * @subpackage Handmade Shop Child
    * @version 1.0.7
    *
    * Child Theme Functions File
    * Created by CMSMasters
    *
    */

    function handmade_shop_child_enqueue_styles() {
    wp_enqueue_style(‘handmade-shop-child-style’, get_stylesheet_uri(), array(), ‘1.0.0’, ‘screen, print’);
    }

    add_action(‘wp_enqueue_scripts’, ‘handmade_shop_child_enqueue_styles’, 11);

    ?>

    <?php

    function wc_add_string_to_price_newline( $price, $product ) {
    $product_id = $product->get_id();

    {
    $price .= “<br> <font size=2>INC UK POSTAGE</font>”;
    }

    return $price;
    }
    add_filter( ‘woocommerce_get_price_html’, ‘wc_add_string_to_price_newline’, 10, 2 );

    add_action(‘woocommerce_after_single_product_summary’, ‘html_below_thumbnails’, 9);
    function html_below_thumbnails() { ?>
    <div style=”clear:both”>Hover on large image to magnify</div>
    <?php
    }

    I did wonder about the closing <?php and the bracket, but removing them causes an unexpected EOF error.

    And these are the entries from the WP error log. Although they show as being 2019, it’s surely just too much of a stretch that they’re actually from exactly the same date last year, isn’t it? :

    [08-Jun-2019 19:30:24 UTC] PHP Warning: require(ABSPATHwp-includes/load.php): failed to open stream: No such file or directory in /home/unicor/unicornstudios.shop/wp-settings.php on line 19

    [08-Jun-2019 19:30:24 UTC] PHP Warning: require(ABSPATHwp-includes/load.php): failed to open stream: No such file or directory in /home/unicor/unicornstudios.shop/wp-settings.php on line 19

    [08-Jun-2019 19:30:24 UTC] PHP Fatal error: require(): Failed opening required ‘ABSPATHwp-includes/load.php’ (include_path=’.:/opt/cpanel/ea-php56/root/usr/share/pear’) in /home/unicor/unicornstudios.shop/wp-settings.php on line 19

    • This reply was modified 9 months ago by Handyann.
    • This reply was modified 9 months ago by Handyann.
    • This reply was modified 9 months ago by Handyann.
    Thread Starter Handyann

    (@handyann)

    This is the only error log I can find via c-panel and this is the only error dated yesterday. I don’t know if it’s relevant:

    [Mon Jun 08 10:54:33.253118 2020] [access_compat:error] [pid 892708:tid 47711319496448] [client 198.54.116.31:56146] AH01797: client denied by server configuration: /home/unicpomu/public_html/wp-content/uploads/woocommerce_uploads/, referer: https://unicornstudios.shop/wp-content/uploads/woocommerce_uploads/

    Thread Starter Handyann

    (@handyann)

    UPDATE: Well, after all that, I did what you suggested – downloaded the child theme files, deleted the old child theme folder and created a new one. I put the old files back one by one and I could log in as normal after the first one went in. It was ok until the functions.php file and then the old cookies error on login reappeared and so did the blank pages.

    corrinarusso

    (@corrinarusso)

    I’m going to assume that the braces from the php that you added into this thread only turned out as “curly” in this thread, and they’re not actually curly in your file.

    There is nothing wrong with the syntax in the file.

    Put the contents of the file back in pieces to see where it fails.
    Add <?php to the top, then chuck it up like this :

    function handmade_shop_child_enqueue_styles() {
    	wp_enqueue_style('handmade-shop-child-style', get_stylesheet_uri(), array(), '1.0.0', 'screen, print');
    }
    add_action('wp_enqueue_scripts', 'handmade_shop_child_enqueue_styles', 11);

    and :

    function wc_add_string_to_price_newline( $price, $product ) {
    	$product_id = $product->get_id();
    	{
    		$price .= '<br> <font size=2>INC UK POSTAGE</font>';
    	}
    return $price;
    }
    add_filter( 'woocommerce_get_price_html', 'wc_add_string_to_price_newline', 10, 2 );

    and :

    function html_below_thumbnails() { ?>
    	<div style='clear:both'>Hover on large image to magnify</div>
    <?php
    }
    add_action('woocommerce_after_single_product_summary', 'html_below_thumbnails', 9);
    Thread Starter Handyann

    (@handyann)

    The braces were curly originally.
    With the help of Github and the PHP.net manual, I think I might have solved the problem by tweaking the PHP a little bit. I know virtually no PHP code, so it’s a bit on a wing and a prayer.
    I took out the intermediate <?PHP and ?> tags, put in a ?> tag at the end and changed the last function, removing the div style bits and adding in echo instead.
    I’ve logged in and out several times and it seems ok, everything is also working as it should from the altered PHP.

    @corrinarusso thank you very much for getting me started on the fix. I really appreciate your time – it was a lot more than the theme dev was willing to commit.

    In my search to fix this, I’ve seen that a lot of other people have had the same issue, so I hope detailing what I’ve done might help them.

    • This reply was modified 9 months ago by Handyann.
Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘All WP admin pages and login are blank’ is closed to new replies.