• Hello,
    After an update to WP 6.4.2 the pages of the site are white.
    Comparing the modified functions with WP 6.4.1 I found that by replacing the function “get_stylesheet_directory()” in the file “includes/theme.php” the site becomes functional.
    Please, is there a way to bypass this by a function from “functions.php”?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi,

    To know the exact error, you should enable debugging. To enable WordPress debugging, search for following code in the wp-config.php file in the root folder of your website.

    define('WP_DEBUG', false);

    and replace with the following:

    define('WP_DEBUG', true);

    define('WP_DEBUG_LOG', true);

    define('WP_DEBUG_DISPLAY', true);

    Save changes. Then refresh the page and see if you see any errors. Post here if you do.

    Thread Starter Elyes EZ

    (@elyeszitari)

    @heateor thanks for youre replay, but debug mode returns nothing !

    I have custom thme based on Sage roots and blade framework.

    i want to resolve issue by creating functin doing same thing as old “get_stylesheet_directory()” function version.

    This function works with the WordPress version that is giving you the problem. So before start fixing it, we should know what the problem is. When you see the White page, check the developer console (Right click > Inspect Element > Console) of your browser and see if there are any Javascript errors. If you post the web page that is giving you problems, I would be able to check what’s wrong.

    Thread Starter Elyes EZ

    (@elyeszitari)

    Hi @luk4,,

    possible fix dont match with my Sage old version, i havent second part function mix() .

    Sorry to hear that @elyeszitari. You should probably seek help directly from the Sage community as Sage stacks are very specific and your issue seems to be related to it.

    Please update this thread with a link to the solution when you have solved this. This will help others.

    Thank you and good luck!

    looking at these:
    https://core.trac.wordpress.org/ticket/60025
    https://core.trac.wordpress.org/ticket/59847

    with Sage 8, since it moves where the default page templates are to a /templates directory, but then uses get_stylesheet_directory, I had to add this filter as suggested on the Sage forum:

    add_filter('stylesheet_directory', function ($tdir, $temp, $root) {
    if (!str_contains($tdir, 'templates')) {
    $tdir .= "/templates";
    }
    return $tdir;
    }, 10, 3);


    this worked for a couple of weeks but i’m guessing WPEngine have been making backend server changes (redirects?) possibly due to a load of users reporting it broken, because now it complains the stylesheet is missing.

    So what I’ve done is to copy style.css into that /templates folder along with the rest of the page templates

    It’s a messy workaround but until we update the Sage version (if Sage 9/10 even resolves this) then it’s a viable temporary solution.

    • This reply was modified 5 months, 2 weeks ago by codemonkeynorth.
    • This reply was modified 5 months, 2 weeks ago by Yui.
Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.