• Hi,
    After 2 frustrating days, I’m hoping I can get some help please? Apolpgies for the length of the post. I’m using the Handmade theme from CMSmasters, with a child theme.

    It started yesterday with the Media Library suddenly refusing to load any thumbnails, although it worked fine as a list and still does.

    Then, having updated a product page (Woocommerce) I tried to preview it, only to be met with a blank page. Actually, all of the after-save pages were also coming up blank by that point.

    So, I logged out in order to check the front-end of the site and it was fine.

    I tried to log in again and was given an error message on the login panel, which said ‘ERROR: Cookies are blocked due to unexpected output’ I don’t really know what that means, despite hunting for info on Google, except that it’s something to do with things being called before the cookies are in place?? I think??

    Then I checked the front end again and the non-Woo pages were only showing code.

    I tried to log in again but didn’t even get the login panel, just a blank white screen.

    Anyway, I was very lucky to find an open admin page on my tablet and have been able to go in and check what I can. The code issue on the frontend pages was caused by 4 vital theme plugins having been deactivated – I KNOW I didn’t do that! – so that was an easy fix.

    I had updated some other plugins and naturally thought that was the problem. I deactivated all the site plugins and reactivated them one by one – problems still there. So I tried the site on the 2020 theme and it was fine. It seems to be something in the Child theme causing the issues, but I have no idea what.

    Can the child theme be reinstalled without losing all the CSS and other changes I’ve made?

    I’m out of options, as I’m no-way an expert, so can someone please read through my tale of woe and help me to get my admin login etc back?
    Many thanks.

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • 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.www.ads-software.com/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?

    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 4 years, 5 months ago by Handyann.
    • This reply was modified 4 years, 5 months ago by Handyann.
    • This reply was modified 4 years, 5 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.

    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 4 years, 5 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.