RuntimeException
Failed to write cache file "/home/salon01/public_html/wp-content/cache/gantry5/g5_hydrogen/twig/61/61da47076d1b7aba45c70ab508a9b1f200698c6220ad2d484345bec9a61cdfa3.php". RuntimeException thrown with message "Failed to write cache file "/home/salon01/public_html/wp-content/cache/gantry5/g5_hydrogen/twig/61/61da47076d1b7aba45c70ab508a9b1f200698c6220ad2d484345bec9a61cdfa3.php"." Stacktrace: #7 RuntimeException in /home/salon01/public_html/wp-content/plugins/gantry5/src/classes/Gantry/Component/Twig/TwigCacheFilesystem.php:78 #6 Gantry\Component\Twig\TwigCacheFilesystem:write in /home/salon01/public_html/wp-content/plugins/gantry5/src/vendor/twig/twig/lib/Twig/Environment.php:452 #5 Twig_Environment:loadTemplate in /home/salon01/public_html/wp-content/plugins/gantry5/src/vendor/twig/twig/lib/Twig/Environment.php:362 #4 Twig_Environment:render in /home/salon01/public_html/wp-content/plugins/gantry5/src/classes/Gantry/Framework/Theme.php:141 #3 Gantry\Framework\Theme:render in /home/salon01/public_html/wp-content/themes/g5_hydrogen/page.php:36 #2 include in /home/salon01/public_html/wp-includes/template-loader.php:98 #1 require_once in /home/salon01/public_html/wp-blog-header.php:19 #0 require in /home/salon01/public_html/index.php:17
Stack frames (8)
7
RuntimeException
/classes/Gantry/Component/Twig/TwigCacheFilesystem.php78
6
Gantry\Component\Twig\TwigCacheFilesystem write
/vendor/twig/twig/lib/Twig/Environment.php452
5
Twig_Environment loadTemplate
/vendor/twig/twig/lib/Twig/Environment.php362
4
Twig_Environment render
/classes/Gantry/Framework/Theme.php141
3
Gantry\Framework\Theme render
/home/salon01/public_html/wp-content/themes/g5_hydrogen/page.php36
2
include
/home/salon01/public_html/wp-includes/template-loader.php98
1
require_once
/home/salon01/public_html/wp-blog-header.php19
0
require
/home/salon01/public_html/index.php17
                throw new \RuntimeException(sprintf('Unable to create the cache directory (%s).', $dir));
            }
        } elseif (!is_writable($dir)) {
            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')) {
                    // Silence error in case if `opcache.restrict_api` directive is set.
                    @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));
    }
    /**
     * {@inheritdoc}
     */
    public function getTimestamp($key)
    {
        if (!file_exists($key)) {
            return 0;
        }
        return (int) @filemtime($key);
    }
}
 
            }
 
            if (!$this->isAutoReload() || $this->isTemplateFresh($name, $this->cache->getTimestamp($key))) {
                $this->cache->load($key);
            }
 
            if (!class_exists($cls, false)) {
                $loader = $this->getLoader();
                if (!$loader instanceof Twig_SourceContextLoaderInterface) {
                    $source = new Twig_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 Twig_Error_Runtime(sprintf('Failed to load Twig template "%s", index "%s": cache is corrupted.', $name, $index), -1, $source);
            }
        }
 
        if (!$this->runtimeInitialized) {
            $this->initRuntime();
        @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 $name    The template name
     * @param array  $context An array of parameters to pass to the template
     *
     * @return string The rendered template
     *
     * @throws Twig_Error_Loader  When the template cannot be found
     * @throws Twig_Error_Syntax  When an error occurred during compilation
     * @throws Twig_Error_Runtime When an error occurred during rendering
     */
    public function render($name, array $context = array())
    {
        return $this->loadTemplate($name)->render($context);
    }
 
    /**
     * Displays a template.
     *
     * @param string $name    The template name
     * @param array  $context An array of parameters to pass to the template
     *
     * @throws Twig_Error_Loader  When the template cannot be found
     * @throws Twig_Error_Syntax  When an error occurred during compilation
     * @throws Twig_Error_Runtime When an error occurred during rendering
     */
    public function display($name, array $context = array())
    {
        $this->loadTemplate($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) {
            \Gantry\Debugger::addMessage('Selecting outline (rules, matches, scores):', 'debug');
            \Gantry\Debugger::addMessage($assignments->getPage(), 'debug');
            \Gantry\Debugger::addMessage($assignments->matches(), 'debug');
            \Gantry\Debugger::addMessage($assignments->scores(), 'debug');
        }
 
        $this->setLayout($selected);
    }
 
    public function widgets_init()
    {
        $gantry = Gantry::instance();
 *
 * This is the template that displays all pages by default.
 * Please note that this is the WordPress construct of pages
 * and that other 'pages' on your WordPress site will use a
 * different template.
 *
 * To generate specific templates for your pages you can use:
 * /mytheme/views/page-mypage.html.twig
 * (which will still route through this PHP file)
 * OR
 * /mytheme/page-mypage.php
 * (in which case you'll want to duplicate this file and save to the above path)
 */
 
$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);
 
$post            = Timber::query_post();
$context['post'] = $post;
 
Timber::render(['page-' . $post->post_name . '.html.twig', 'page.html.twig'], $context);
 
            }
 
            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( dirname( __FILE__ ) . '/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( dirname( __FILE__ ) . '/wp-blog-header.php' );
 

Environment & details:

empty
empty
empty
empty
empty
Key Value
SERVER_SOFTWARE Apache
REQUEST_URI /
PATH /usr/local/bin:/usr/bin:/bin
TEMP /tmp
TMP /tmp
TMPDIR /tmp
PWD /
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_ACCEPT_ENCODING br,gzip
HTTP_ACCEPT_LANGUAGE en-US,en;q=0.5
HTTP_CONNECTION Keep-Alive
CONTENT_LENGTH 0
HTTP_HOST frizerskisaloni.si
HTTP_USER_AGENT CCBot/2.0 (https://commoncrawl.org/faq/)
HTTP_IF_MODIFIED_SINCE Mon, 28 Sep 2020 16:25:03 GMT
UNIQUE_ID X5r4voxu1jRnfjFh8seE2gAAAAo
SCRIPT_URL /
SCRIPT_URI http://frizerskisaloni.si/
SERVER_SIGNATURE
SERVER_NAME frizerskisaloni.si
SERVER_ADDR 193.9.21.48
SERVER_PORT 80
REMOTE_ADDR 18.234.97.53
DOCUMENT_ROOT /home/salon01/public_html
REQUEST_SCHEME http
CONTEXT_PREFIX
CONTEXT_DOCUMENT_ROOT /home/salon01/public_html
SERVER_ADMIN webmaster@frizerskisaloni.si
SCRIPT_FILENAME /home/salon01/public_html/index.php
REMOTE_PORT 48030
SERVER_PROTOCOL HTTP/1.1
REQUEST_METHOD GET
QUERY_STRING
SCRIPT_NAME /index.php
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1603991742.811
REQUEST_TIME 1603991742
Key Value
PATH /usr/local/bin:/usr/bin:/bin
TEMP /tmp
TMP /tmp
TMPDIR /tmp
PWD /
0. Whoops\Handler\PrettyPageHandler