RuntimeException
Failed to write cache file "/nas/content/live/gfguide/wp-content/cache/gantry5/TMSC/twig/f9/f9b00333b15ce8430e839646bc56c43684d497adb05f92b050c04d5721e1e058.php". RuntimeException thrown with message "Failed to write cache file "/nas/content/live/gfguide/wp-content/cache/gantry5/TMSC/twig/f9/f9b00333b15ce8430e839646bc56c43684d497adb05f92b050c04d5721e1e058.php"." Stacktrace: #9 RuntimeException in /nas/content/live/gfguide/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Cache/FilesystemCache.php:80 #8 Twig\Cache\FilesystemCache:write in /nas/content/live/gfguide/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Environment.php:487 #7 Twig\Environment:loadClass in /nas/content/live/gfguide/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Environment.php:445 #6 Twig\Environment:loadTemplate in /nas/content/live/gfguide/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Environment.php:423 #5 Twig\Environment:load in /nas/content/live/gfguide/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Environment.php:384 #4 Twig\Environment:render in /nas/content/live/gfguide/wp-content/plugins/gantry5/src/classes/Gantry/Framework/Theme.php:153 #3 Gantry\Framework\Theme:render in /nas/content/live/gfguide/wp-content/themes/g5_helium/archive.php:29 #2 include in /nas/content/live/gfguide/wp-includes/template-loader.php:106 #1 require_once in /nas/content/live/gfguide/wp-blog-header.php:19 #0 require in /nas/content/live/gfguide/index.php:17
Stack frames (10)
9
RuntimeException
/compat/vendor/twig/twig/src/Cache/FilesystemCache.php80
8
Twig\Cache\FilesystemCache write
/compat/vendor/twig/twig/src/Environment.php487
7
Twig\Environment loadClass
/compat/vendor/twig/twig/src/Environment.php445
6
Twig\Environment loadTemplate
/compat/vendor/twig/twig/src/Environment.php423
5
Twig\Environment load
/compat/vendor/twig/twig/src/Environment.php384
4
Twig\Environment render
/src/classes/Gantry/Framework/Theme.php153
3
Gantry\Framework\Theme render
/nas/content/live/gfguide/wp-content/themes/g5_helium/archive.php29
2
include
/nas/content/live/gfguide/wp-includes/template-loader.php106
1
require_once
/nas/content/live/gfguide/wp-blog-header.php19
0
require
/nas/content/live/gfguide/index.php17
            throw new \RuntimeException(sprintf('Unable to write in the cache directory (%s).', $dir));
        }
 
        $tmpFile = tempnam($dir, basename($key));
        if (false !== @file_put_contents($tmpFile, $content) && @rename($tmpFile, $key)) {
            @chmod($key, 0666 & ~umask());
 
            if (self::FORCE_BYTECODE_INVALIDATION == ($this->options & self::FORCE_BYTECODE_INVALIDATION)) {
                // Compile cached file into bytecode cache
                if (\function_exists('opcache_invalidate') && filter_var(ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN)) {
                    @opcache_invalidate($key, true);
                } elseif (\function_exists('apc_compile_file')) {
                    apc_compile_file($key);
                }
            }
 
            return;
        }
 
        throw new \RuntimeException(sprintf('Failed to write cache file "%s".', $key));
    }
 
    public function getTimestamp($key)
    {
        if (!file_exists($key)) {
            return 0;
        }
 
        return (int) @filemtime($key);
    }
}
 
class_alias('Twig\Cache\FilesystemCache', 'Twig_Cache_Filesystem');
 
 
            if (!$this->isAutoReload() || $this->isTemplateFresh($name, $this->cache->getTimestamp($key))) {
                $this->cache->load($key);
            }
 
            $source = null;
            if (!class_exists($cls, false)) {
                $loader = $this->getLoader();
                if (!$loader instanceof SourceContextLoaderInterface) {
                    $source = new Source($loader->getSource($name), $name);
                } else {
                    $source = $loader->getSourceContext($name);
                }
 
                $content = $this->compileSource($source);
 
                if ($this->bcWriteCacheFile) {
                    $this->writeCacheFile($key, $content);
                } else {
                    $this->cache->write($key, $content);
                    $this->cache->load($key);
                }
 
                if (!class_exists($mainCls, false)) {
                    /* Last line of defense if either $this->bcWriteCacheFile was used,
                     * $this->cache is implemented as a no-op or we have a race condition
                     * where the cache was cleared between the above calls to write to and load from
                     * the cache.
                     */
                    eval('?>'.$content);
                }
            }
 
            if (!class_exists($cls, false)) {
                throw new RuntimeError(sprintf('Failed to load Twig template "%s", index "%s": cache might be corrupted.', $name, $index), -1, $source);
            }
        }
 
        if (!$this->runtimeInitialized) {
            $this->initRuntime();
    /**
     * Loads a template internal representation.
     *
     * This method is for internal use only and should never be called
     * directly.
     *
     * @param string $name  The template name
     * @param int    $index The index if it is an embedded template
     *
     * @return \Twig_TemplateInterface A template instance representing the given template name
     *
     * @throws LoaderError  When the template cannot be found
     * @throws RuntimeError When a previously generated cache is corrupted
     * @throws SyntaxError  When an error occurred during compilation
     *
     * @internal
     */
    public function loadTemplate($name, $index = null)
    {
        return $this->loadClass($this->getTemplateClass($name), $name, $index);
    }
 
    /**
     * @internal
     */
    public function loadClass($cls, $name, $index = null)
    {
        $mainCls = $cls;
        if (null !== $index) {
            $cls .= '___'.$index;
        }
 
        if (isset($this->loadedTemplates[$cls])) {
            return $this->loadedTemplates[$cls];
        }
 
        if (!class_exists($cls, false)) {
            if ($this->bcGetCacheFilename) {
                $key = $this->getCacheFilename($name);
            } else {
     *
     * @param string|TemplateWrapper|\Twig\Template $name The template name
     *
     * @throws LoaderError  When the template cannot be found
     * @throws RuntimeError When a previously generated cache is corrupted
     * @throws SyntaxError  When an error occurred during compilation
     *
     * @return TemplateWrapper
     */
    public function load($name)
    {
        if ($name instanceof TemplateWrapper) {
            return $name;
        }
 
        if ($name instanceof Template) {
            return new TemplateWrapper($this, $name);
        }
 
        return new TemplateWrapper($this, $this->loadTemplate($name));
    }
 
    /**
     * Loads a template internal representation.
     *
     * This method is for internal use only and should never be called
     * directly.
     *
     * @param string $name  The template name
     * @param int    $index The index if it is an embedded template
     *
     * @return \Twig_TemplateInterface A template instance representing the given template name
     *
     * @throws LoaderError  When the template cannot be found
     * @throws RuntimeError When a previously generated cache is corrupted
     * @throws SyntaxError  When an error occurred during compilation
     *
     * @internal
     */
    public function loadTemplate($name, $index = null)
        @trigger_error(sprintf('The %s method is deprecated since version 1.22 and will be removed in Twig 2.0.', __METHOD__), \E_USER_DEPRECATED);
 
        return $this->templateClassPrefix;
    }
 
    /**
     * Renders a template.
     *
     * @param string|TemplateWrapper $name    The template name
     * @param array                  $context An array of parameters to pass to the template
     *
     * @return string The rendered template
     *
     * @throws LoaderError  When the template cannot be found
     * @throws SyntaxError  When an error occurred during compilation
     * @throws RuntimeError When an error occurred during rendering
     */
    public function render($name, array $context = [])
    {
        return $this->load($name)->render($context);
    }
 
    /**
     * Displays a template.
     *
     * @param string|TemplateWrapper $name    The template name
     * @param array                  $context An array of parameters to pass to the template
     *
     * @throws LoaderError  When the template cannot be found
     * @throws SyntaxError  When an error occurred during compilation
     * @throws RuntimeError When an error occurred during rendering
     */
    public function display($name, array $context = [])
    {
        $this->load($name)->display($context);
    }
 
    /**
     * Loads a template.
     *
 
    /**
     * @see AbstractTheme::render()
     *
     * @param string $file
     * @param array $context
     * @return string
     */
    public function render($file, array $context = [])
    {
        static $timberContext;
 
        if (!isset($timberContext)) {
            $timberContext = Timber::get_context();
        }
 
        // Include Gantry specific things to the context.
        $context = array_replace($timberContext, $context);
 
        return $this->renderer()->render($file, $context);
    }
 
    public function set_template_layout()
    {
        $assignments = new Assignments();
        $selected = $assignments->select();
 
        if (\GANTRY_DEBUGGER) {
            Debugger::addMessage('Selecting outline (rules, matches, scores):', 'debug');
            Debugger::addMessage($assignments->getPage(), 'debug');
            Debugger::addMessage($assignments->matches(), 'debug');
            Debugger::addMessage($assignments->scores(), 'debug');
        }
 
        $this->setLayout($selected);
    }
 
    public function widgets_init()
    {
        $gantry = Gantry::instance();

defined('ABSPATH') or die;

use Timber\Timber;

/*
 * The template for displaying Archive pages.
 *
 * Used to display archive-type pages if nothing more specific matches a query.
 * For example, puts together date-based pages if no date.php file exists.
 *
 * Learn more: http://codex.wordpress.org/Template_Hierarchy
 */

$gantry = Gantry\Framework\Gantry::instance();
$theme  = $gantry['theme'];

// We need to render contents of <head> before plugin content gets added.
$context              = Timber::get_context();
$context['page_head'] = $theme->render('partials/page_head.html.twig', $context);

$templates = ['archive.html.twig', 'index.html.twig'];

$context['title'] = __('Archive', 'g5_helium');
if (is_day()) {
    $context['title'] = __('Archive:', 'g5_helium') . ' ' . get_the_date('j F Y');
} else if (is_month()) {
    $context['title'] = __('Archive:', 'g5_helium') . ' ' . get_the_date('F Y');
} else if (is_year()) {
    $context['title'] = __('Archive:', 'g5_helium') . ' ' . get_the_date('Y');
} else if (is_tag()) {
    $context['title'] = single_tag_title('', false);
} else if (is_category()) {
    $context['title'] = single_cat_title('', false);
    array_unshift($templates, 'archive-' . get_query_var('cat') . '.html.twig');
} else if (is_post_type_archive()) {
    $context['title'] = post_type_archive_title('', false);
    array_unshift($templates, 'archive-' . get_post_type() . '.html.twig');
}

            }
 
            break;
        }
    }
 
    if ( ! $template ) {
        $template = get_index_template();
    }
 
    /**
     * Filters the path of the current template before including it.
     *
     * @since 3.0.0
     *
     * @param string $template The path of the template to include.
     */
    $template = apply_filters( 'template_include', $template );
    if ( $template ) {
        include $template;
    } elseif ( current_user_can( 'switch_themes' ) ) {
        $theme = wp_get_theme();
        if ( $theme->errors() ) {
            wp_die( $theme->errors() );
        }
    }
    return;
}
 
<?php
/**
 * Loads the WordPress environment and template.
 *
 * @package WordPress
 */
 
if ( ! isset( $wp_did_header ) ) {
 
    $wp_did_header = true;
 
    // Load the WordPress library.
    require_once __DIR__ . '/wp-load.php';
 
    // Set up the WordPress query.
    wp();
 
    // Load the theme template.
    require_once ABSPATH . WPINC . '/template-loader.php';
 
}
 
<?php
/**
 * Front to the WordPress application. This file doesn't do anything, but loads
 * wp-blog-header.php which does and tells WordPress to load the theme.
 *
 * @package WordPress
 */
 
/**
 * Tells WordPress to load the WordPress theme and output it.
 *
 * @var bool
 */
define( 'WP_USE_THEMES', true );
 
/** Loads the WordPress Environment and Template */
require __DIR__ . '/wp-blog-header.php';
 

Environment & details:

empty
empty
empty
empty
empty
Key Value
SERVER_SOFTWARE nginx
REQUEST_URI /2014/12/22/
USER fpm200017
HOME /home/fpm200017
SCRIPT_FILENAME /nas/content/live/gfguide/index.php
HTTP_ACCEPT_ENCODING gzip
PHP_VALUE upload_max_filesize=50M; post_max_size=100M;
PHP_ADMIN_VALUE syslog.ident=phperr-gfguide; newrelic.appname=gfguide; newrelic.browser_monitoring.auto_instrument=off; newrelic.enabled=off; newrelic.license=; sendmail_path=/bin/sendmail-wrapper.sh 9c6b06b5c198384abe6191dea6663a37b89f8472 /usr/sbin/sendmail -t -i;
DOCUMENT_URI /index.php
REQUEST_METHOD GET
IS_WPE 1
SERVER_PORT 80
SYSLOG_IDENT phperr-gfguide
REQUEST_SCHEME http
HTTPS on
HTTP_X_IS_BOT 1
HTTP_X_WPE_REQUEST_ID 1b663c16b94457a9dfee0dc50ae3ab7d
HTTP_X_FORWARDED_PROTO https
HTTP_X_REAL_IP_REMOTE 216.73.216.107
SERVER_NAME www.goodfuneralguide.co.uk
CONTENT_TYPE
QUERY_STRING
GATEWAY_INTERFACE CGI/1.1
HTTP_X_UA_ORIGINAL Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
HTTP_X_WORDPRESS_TYPE DEFAULT
REMOTE_ADDR 216.73.216.107
SERVER_PROTOCOL HTTP/1.1
SERVER_ADDR 127.0.0.1
HTTP_X_WPENGINE_PHP_VERSION 8.4
HTTP_X_FORWARDED_HOST www.goodfuneralguide.co.uk
PATH_TRANSLATED /nas/content/live/gfguide/index.php
REMOTE_PORT
HTTP_X_WPE_SSL 1
HTTP_REFERER http://www.goodfuneralguide.co.uk/2014/12/22/
HTTP_X_WPE_INSTALL_NAME gfguide
HTTP_USER_AGENT Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
HTTP_X_CACHE_GROUP normal
CONTENT_LENGTH 0
HTTP_WPE_READONLY on
HTTP_RAWHOST www.goodfuneralguide.co.uk
HTTP_VIA 1.1 pod-402161 (Varnish/7.7)
PATH_INFO
REDIRECT_STATUS 200
HTTP_CF_CONNECTING_IP 216.73.216.107, 216.73.216.107
HTTP_ACCEPT */*
HTTP_X_WPE_LOCAL_SSL 1
HTTP_HOST www.goodfuneralguide.co.uk
DOCUMENT_ROOT /nas/content/live/gfguide
SCRIPT_NAME /index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1770393735.99
REQUEST_TIME 1770393735
Key Value
USER fpm200017
HOME /home/fpm200017
SCRIPT_FILENAME /nas/content/live/gfguide/index.php
HTTP_ACCEPT_ENCODING gzip
PHP_VALUE upload_max_filesize=50M; post_max_size=100M;
PHP_ADMIN_VALUE syslog.ident=phperr-gfguide; newrelic.appname=gfguide; newrelic.browser_monitoring.auto_instrument=off; newrelic.enabled=off; newrelic.license=; sendmail_path=/bin/sendmail-wrapper.sh 9c6b06b5c198384abe6191dea6663a37b89f8472 /usr/sbin/sendmail -t -i;
DOCUMENT_URI /index.php
REQUEST_URI /2014/12/22/
REQUEST_METHOD GET
IS_WPE 1
SERVER_PORT 80
SYSLOG_IDENT phperr-gfguide
REQUEST_SCHEME http
HTTPS on
SERVER_SOFTWARE nginx
HTTP_X_IS_BOT 1
HTTP_X_WPE_REQUEST_ID 1b663c16b94457a9dfee0dc50ae3ab7d
HTTP_X_FORWARDED_PROTO https
HTTP_X_REAL_IP_REMOTE 216.73.216.107
SERVER_NAME www.goodfuneralguide.co.uk
CONTENT_TYPE
QUERY_STRING
GATEWAY_INTERFACE CGI/1.1
HTTP_X_UA_ORIGINAL Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
HTTP_X_WORDPRESS_TYPE DEFAULT
REMOTE_ADDR 216.73.216.107
SERVER_PROTOCOL HTTP/1.1
SERVER_ADDR 127.0.0.1
HTTP_X_WPENGINE_PHP_VERSION 8.4
HTTP_X_FORWARDED_HOST www.goodfuneralguide.co.uk
PATH_TRANSLATED /nas/content/live/gfguide/index.php
REMOTE_PORT
HTTP_X_WPE_SSL 1
HTTP_REFERER http://www.goodfuneralguide.co.uk/2014/12/22/
HTTP_X_WPE_INSTALL_NAME gfguide
HTTP_USER_AGENT Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
HTTP_X_CACHE_GROUP normal
CONTENT_LENGTH 0
HTTP_WPE_READONLY on
HTTP_RAWHOST www.goodfuneralguide.co.uk
HTTP_VIA 1.1 pod-402161 (Varnish/7.7)
PATH_INFO
REDIRECT_STATUS 200
HTTP_CF_CONNECTING_IP 216.73.216.107, 216.73.216.107
HTTP_ACCEPT */*
HTTP_X_WPE_LOCAL_SSL 1
HTTP_HOST www.goodfuneralguide.co.uk
DOCUMENT_ROOT /nas/content/live/gfguide
SCRIPT_NAME /index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1770393735.99
REQUEST_TIME 1770393735
0. Whoops\Handler\PrettyPageHandler