Ad

WordPress White Screen Of Death On Staging

- 1 answer

I have a WordPress page that is working as intended locally, but breaking (white screen of death) after deployment to staging.

I'm using Timber/Twig. The Template seems to be causing the issue, but then again, why would the template not throw an issue on local if it was a code issue?

Maybe someone has insight.

<?php

/* Template Name: *** */

use Timber\Timber;
use Timber\PostQuery;
use Flynt\Utils\Options;

use const Flynt\Archives\POST_TYPES;

$context = Timber::get_context();

$context['banner'] = get_field('banner');
$context['status'] = get_field('status');
$context['resources'] = get_field('resources');
$context['information'] = get_field('information');

if (isset($_GET['contentOnly'])) {
    $context['contentOnly'] = true;
}

Timber::render('templates/events/***.twig', $context);
Ad

Answer

FYI, this issue was because the server is case-sensitive be aware of this if this happens, ensure your path is completely correct.

Ad
source: stackoverflow.com
Ad