Twig \ Error \ RuntimeError
An exception has been thrown during the rendering of a template ("Rendering Atom 'aos' failed on error: Failed to save file C:/inetpub/wwwroot/sojournertruthhouse.org/wp-content/cache/gantry5/rt_phoenix/html/e58197956a9265f0cdbb3bf1820494b6.php").
Previous exceptions
  • Rendering Atom 'aos' failed on error: Failed to save file C:/inetpub/wwwroot/sojournertruthhouse.org/wp-content/cache/gantry5/rt_phoenix/html/e58197956a9265f0cdbb3bf1820494b6.php (500)
  • Failed to save file C:/inetpub/wwwroot/sojournertruthhouse.org/wp-content/cache/gantry5/rt_phoenix/html/e58197956a9265f0cdbb3bf1820494b6.php (0)
Twig\Error\RuntimeError thrown with message "An exception has been thrown during the rendering of a template ("Rendering Atom 'aos' failed on error: Failed to save file C:/inetpub/wwwroot/sojournertruthhouse.org/wp-content/cache/gantry5/rt_phoenix/html/e58197956a9265f0cdbb3bf1820494b6.php")." Stacktrace: #20 Twig\Error\RuntimeError in C:\inetpub\wwwroot\sojournertruthhouse.org\wp-content\plugins\gantry5\engines\nucleus\templates\page_head.html.twig:2 #19 RuntimeException in C:\inetpub\wwwroot\sojournertruthhouse.org\wp-content\plugins\gantry5\src\classes\Gantry\Component\Theme\ThemeTrait.php:421 #18 RuntimeException in C:\inetpub\wwwroot\sojournertruthhouse.org\wp-content\plugins\gantry5\vendor\rockettheme\toolbox\File\src\AbstractFile.php:374 #17 RocketTheme\Toolbox\File\AbstractFile:save in C:\inetpub\wwwroot\sojournertruthhouse.org\wp-content\plugins\gantry5\vendor\rockettheme\toolbox\File\src\PhpFile.php:46 #16 RocketTheme\Toolbox\File\PhpFile:save in C:\inetpub\wwwroot\sojournertruthhouse.org\wp-content\plugins\gantry5\src\classes\Gantry\Component\Theme\ThemeTrait.php:834 #15 Gantry\Framework\Theme:getContent in C:\inetpub\wwwroot\sojournertruthhouse.org\wp-content\plugins\gantry5\src\classes\Gantry\Component\Theme\ThemeTrait.php:416 #14 Gantry\Framework\Theme:loadAtoms in C:\inetpub\wwwroot\sojournertruthhouse.org\wp-content\plugins\gantry5\compat\vendor\twig\twig\src\Template.php:700 #13 Twig\Template:getAttribute in C:\inetpub\wwwroot\sojournertruthhouse.org\wp-content\cache\gantry5\rt_phoenix\twig\16\16e08e583486859acc107ec2c189b5884e67aaf2160f901236fee31576e69b69.php:42 #12 __TwigTemplate_ecfbb32f603058520204a7c82487a71539f89a222ff955d0e7ff3bc367a3238a:doDisplay in C:\inetpub\wwwroot\sojournertruthhouse.org\wp-content\plugins\gantry5\compat\vendor\twig\twig\src\Template.php:453 #11 Twig\Template:displayWithErrorHandling in C:\inetpub\wwwroot\sojournertruthhouse.org\wp-content\plugins\gantry5\compat\vendor\twig\twig\src\Template.php:420 #10 Twig\Template:display in C:\inetpub\wwwroot\sojournertruthhouse.org\wp-content\cache\gantry5\rt_phoenix\twig\c6\c62473893e4fae16c0c9914a59cf1f6b76d99fac774aab2a5dbf87124a89e0e0.php:38 #9 __TwigTemplate_8eecfd938acba52a2e1038e3765de526ad7a71b2258ca08b1d44d529cf3606d2:doDisplay in C:\inetpub\wwwroot\sojournertruthhouse.org\wp-content\plugins\gantry5\compat\vendor\twig\twig\src\Template.php:453 #8 Twig\Template:displayWithErrorHandling in C:\inetpub\wwwroot\sojournertruthhouse.org\wp-content\plugins\gantry5\compat\vendor\twig\twig\src\Template.php:420 #7 Twig\Template:display in C:\inetpub\wwwroot\sojournertruthhouse.org\wp-content\plugins\gantry5\compat\vendor\twig\twig\src\Template.php:432 #6 Twig\Template:render in C:\inetpub\wwwroot\sojournertruthhouse.org\wp-content\plugins\gantry5\compat\vendor\twig\twig\src\TemplateWrapper.php:47 #5 Twig\TemplateWrapper:render in C:\inetpub\wwwroot\sojournertruthhouse.org\wp-content\plugins\gantry5\compat\vendor\twig\twig\src\Environment.php:384 #4 Twig\Environment:render in C:\inetpub\wwwroot\sojournertruthhouse.org\wp-content\plugins\gantry5\src\classes\Gantry\Framework\Theme.php:153 #3 Gantry\Framework\Theme:render in C:\inetpub\wwwroot\sojournertruthhouse.org\wp-content\themes\rt_phoenix\page.php:34 #2 include in C:\inetpub\wwwroot\sojournertruthhouse.org\wp-includes\template-loader.php:106 #1 require_once in C:\inetpub\wwwroot\sojournertruthhouse.org\wp-blog-header.php:19 #0 require in C:\inetpub\wwwroot\sojournertruthhouse.org\index.php:17
Stack frames (21)
20
Twig\Error\RuntimeError
…\engines\nucleus\templates\page_head.html.twig2
19
RuntimeException
…\src\classes\Gantry\Component\Theme\ThemeTrait.php421
18
RuntimeException
…\vendor\rockettheme\toolbox\File\src\AbstractFile.php374
17
RocketTheme\Toolbox\File\AbstractFile save
…\vendor\rockettheme\toolbox\File\src\PhpFile.php46
16
RocketTheme\Toolbox\File\PhpFile save
…\src\classes\Gantry\Component\Theme\ThemeTrait.php834
15
Gantry\Framework\Theme getContent
…\src\classes\Gantry\Component\Theme\ThemeTrait.php416
14
Gantry\Framework\Theme loadAtoms
…\compat\vendor\twig\twig\src\Template.php700
13
Twig\Template getAttribute
C:\inetpub\wwwroot\sojournertruthhouse.org\wp-content\cache\gantry5\rt_phoenix\twig\16\16e08e583486859acc107ec2c189b5884e67aaf2160f901236fee31576e69b69.php42
12
__TwigTemplate_ecfbb32f603058520204a7c82487a71539f89a222ff955d0e7ff3bc367a3238a doDisplay
…\compat\vendor\twig\twig\src\Template.php453
11
Twig\Template displayWithErrorHandling
…\compat\vendor\twig\twig\src\Template.php420
10
Twig\Template display
C:\inetpub\wwwroot\sojournertruthhouse.org\wp-content\cache\gantry5\rt_phoenix\twig\c6\c62473893e4fae16c0c9914a59cf1f6b76d99fac774aab2a5dbf87124a89e0e0.php38
9
__TwigTemplate_8eecfd938acba52a2e1038e3765de526ad7a71b2258ca08b1d44d529cf3606d2 doDisplay
…\compat\vendor\twig\twig\src\Template.php453
8
Twig\Template displayWithErrorHandling
…\compat\vendor\twig\twig\src\Template.php420
7
Twig\Template display
…\compat\vendor\twig\twig\src\Template.php432
6
Twig\Template render
…\compat\vendor\twig\twig\src\TemplateWrapper.php47
5
Twig\TemplateWrapper render
…\compat\vendor\twig\twig\src\Environment.php384
4
Twig\Environment render
…\src\classes\Gantry\Framework\Theme.php153
3
Gantry\Framework\Theme render
C:\inetpub\wwwroot\sojournertruthhouse.org\wp-content\themes\rt_phoenix\page.php34
2
include
C:\inetpub\wwwroot\sojournertruthhouse.org\wp-includes\template-loader.php106
1
require_once
C:\inetpub\wwwroot\sojournertruthhouse.org\wp-blog-header.php19
0
require
C:\inetpub\wwwroot\sojournertruthhouse.org\index.php17
{%- do gantry.debugger.assets() -%}
{%- do gantry.theme.loadAtoms() -%}
 
{% set faEnabled = gantry.config.page.fontawesome.enable|default(1) %}
{% set faVersion = gantry.config.page.fontawesome.version ?? gantry.config.page.fontawesome.default_version ?? 'fa4' %}
 
{% assets with { priority: 10 } %}
    {% block head_stylesheets -%}
        <link rel="stylesheet" href="gantry-engine://css-compiled/nucleus.css" type="text/css"/>
        {% for scss in gantry.theme.configuration.css.persistent|default(gantry.theme.configuration.css.files) %}
        <link rel="stylesheet" href="{{ scss }}.scss" type="text/css"/>
        {%- endfor %}
    {% endblock -%}
 
    {% block head_scripts -%}
        {% if faEnabled %}
            {% if faVersion == 'manual' or gantry.config.page.fontawesome.html_js_import|trim %}
                {{ gantry.config.page.fontawesome.html_js_import|html|raw -}}
            {% elseif faVersion == 'fa5js' %}
                <script type="text/javascript" src="{{ url('gantry-assets://js/font-awesome6-all.min.js') }}"></script>
                {% if gantry.config.page.fontawesome.fa4_compatibility|default(1) %}
                    <script type="text/javascript" src="{{ url('gantry-assets://js/font-awesome6-shim.min.js') }}"></script>
                {% endif %}
            {% endif %}
        {% endif %}
    {% endblock -%}
 
    {% block head_platform %}{% endblock %}
 
    {% block head_overrides -%}
        {% if faEnabled %}
            {% if faVersion == 'manual' or gantry.config.page.fontawesome.html_css_import|trim %}
                {{ gantry.config.page.fontawesome.html_css_import|html|raw -}}
            {% elseif faVersion == 'fa4' %}
                <link rel="stylesheet" href="gantry-assets://css/font-awesome.min.css" type="text/css"/>
            {% elseif faVersion == 'fa5css' %}
                <link rel="stylesheet" href="gantry-assets://css/font-awesome6-all.min.css" type="text/css">
                {% if gantry.config.page.fontawesome.fa4_compatibility|default(1) %}
 
                {% endif %}
            $config = $gantry['config'];
 
            /** @var Document $document */
            $document = $gantry['document'];
 
            $atoms = (array) $config->get('page.head.atoms');
 
            foreach ($atoms as $data) {
                $atom = [
                    'type' => 'atom',
                    'subtype' => $data['type'],
                ] + $data;
 
                try {
                    $block = $this->getContent($atom);
                    $document->addBlock($block);
 
                } catch (\Exception $e) {
                    if ($gantry->debug()) {
                        throw new \RuntimeException("Rendering Atom '{$atom['subtype']}' failed on error: {$e->getMessage()}", 500, $e);
                    }
                }
            }
 
            $assets = (array) $config->get('page.assets');
 
            if ($assets) {
                $atom = [
                    'id' => 'page-assets',
                    'title' => 'Page Assets',
                    'type' => 'atom',
                    'subtype' => 'assets',
                    'attributes' => $assets + ['enabled' => 1]
                ];
 
                try {
                    $block = $this->getContent($atom);
                    $document->addBlock($block);
 
                } catch (\Exception $e) {
Exception message: Rendering Atom 'aos' failed on error: Failed to save file C:/inetpub/wwwroot/sojournertruthhouse.org/wp-content/cache/gantry5/rt_phoenix/html/e58197956a9265f0cdbb3bf1820494b6.php
                if (@ftruncate($this->handle, 0) === false || @fwrite($this->handle, $this->raw()) === false) {
                    // Writing file failed, throw an error.
                    $tmp = false;
                }
            } else {
                // Create file with a temporary name and rename it to make the save action atomic.
                $tmp = $this->tempname($filename);
                if (file_put_contents($tmp, $this->raw()) === false) {
                    $tmp = false;
                } elseif (@rename($tmp, $filename) === false) {
                    @unlink($tmp);
                    $tmp = false;
                }
            }
        } catch (Exception $e) {
            $tmp = false;
        }
 
        if ($tmp === false) {
            throw new RuntimeException('Failed to save file ' . $filename);
        }
 
        // Touch the directory as well, thus marking it modified.
        @touch($dir);
    }
 
    /**
     * Rename file in the filesystem if it exists.
     *
     * @param string $filename
     * @return bool
     */
    public function rename($filename)
    {
        if (null !== $this->filename && $this->exists() && !@rename($this->filename, $filename)) {
            return false;
        }
 
        unset(static::$instances[$this->filename]);
        static::$instances[$filename] = $this;
Exception message: Failed to save file C:/inetpub/wwwroot/sojournertruthhouse.org/wp-content/cache/gantry5/rt_phoenix/html/e58197956a9265f0cdbb3bf1820494b6.php
     * @return array
     */
    public function content($var = null)
    {
        /** @var array $content */
        $content = parent::content($var);
 
        return $content;
    }
 
    /**
     * Saves PHP file and invalidates opcache.
     *
     * @param  mixed  $data  Optional data to be saved, usually array.
     * @return void
     * @throws RuntimeException
     */
    public function save($data = null)
    {
        parent::save($data);
 
        // Invalidate configuration file from the opcache.
        if (null !== $this->filename && function_exists('opcache_invalidate')) {
            @opcache_invalidate($this->filename, true);
        }
    }
 
    /**
     * Check contents and make sure it is in correct format.
     *
     * @param mixed $var
     * @return array
     * @throws RuntimeException
     */
    protected function check($var)
    {
        if (!(is_array($var) || is_object($var))) {
            throw new RuntimeException('Provided data is not an array');
        }
 
                }
            }
        }
 
        // Create new document context for assets.
        $context = $this->getContext(['segment' => $item, 'enabled' => 1, 'particle' => $particle] + $options);
 
        /** @var Document $document */
        $document = $gantry['document'];
        $document::push();
        $html = trim($this->render("@nucleus/content/{$item->type}.html.twig", $context));
        $content = $document::pop()->setContent($html);
 
        if (isset($file)) {
            // Save HTML and assets into the cache.
            if (\GANTRY_DEBUGGER) {
                Debugger::addMessage(sprintf('Caching %s %s', $item->type, $item->id), 'debug');
            }
 
            $file->save($content->toArray());
        }
 
        return $content;
    }
}
 
            }
 
            $gantry = static::gantry();
 
            /** @var Config $config */
            $config = $gantry['config'];
 
            /** @var Document $document */
            $document = $gantry['document'];
 
            $atoms = (array) $config->get('page.head.atoms');
 
            foreach ($atoms as $data) {
                $atom = [
                    'type' => 'atom',
                    'subtype' => $data['type'],
                ] + $data;
 
                try {
                    $block = $this->getContent($atom);
                    $document->addBlock($block);
 
                } catch (\Exception $e) {
                    if ($gantry->debug()) {
                        throw new \RuntimeException("Rendering Atom '{$atom['subtype']}' failed on error: {$e->getMessage()}", 500, $e);
                    }
                }
            }
 
            $assets = (array) $config->get('page.assets');
 
            if ($assets) {
                $atom = [
                    'id' => 'page-assets',
                    'title' => 'Page Assets',
                    'type' => 'atom',
                    'subtype' => 'assets',
                    'attributes' => $assets + ['enabled' => 1]
                ];
 
            if ($ignoreStrictCheck || !$this->env->isStrictVariables()) {
                return;
            }
 
            throw new RuntimeError(sprintf('Neither the property "%1$s" nor one of the methods "%1$s()", "get%1$s()"/"is%1$s()" or "__call()" exist and have public access in class "%2$s".', $item, $class), -1, $this->getSourceContext());
        }
 
        if ($isDefinedTest) {
            return true;
        }
 
        if ($this->env->hasExtension('\Twig\Extension\SandboxExtension')) {
            $this->env->getExtension('\Twig\Extension\SandboxExtension')->checkMethodAllowed($object, $method);
        }
 
        // Some objects throw exceptions when they have __call, and the method we try
        // to call is not supported. If ignoreStrictCheck is true, we should return null.
        try {
            if (!$arguments) {
                $ret = $object->$method();
            } else {
                $ret = \call_user_func_array([$object, $method], $arguments);
            }
        } catch (\BadMethodCallException $e) {
            if ($call && ($ignoreStrictCheck || !$this->env->isStrictVariables())) {
                return;
            }
            throw $e;
        }
 
        // @deprecated in 1.28
        if ($object instanceof \Twig_TemplateInterface) {
            $self = $object->getTemplateName() === $this->getTemplateName();
            $message = sprintf('Calling "%s" on template "%s" from template "%s" is deprecated since version 1.28 and won\'t be supported anymore in 2.0.', $item, $object->getTemplateName(), $this->getTemplateName());
            if ('renderBlock' === $method || 'displayBlock' === $method) {
                $message .= sprintf(' Use block("%s"%s) instead).', $arguments[0], $self ? '' : ', template');
            } elseif ('hasBlock' === $method) {
                $message .= sprintf(' Use "block("%s"%s) is defined" instead).', $arguments[0], $self ? '' : ', template');
            } elseif ('render' === $method || 'display' === $method) {
                $message .= sprintf(' Use include("%s") instead).', $object->getTemplateName());
        $this->blocks = [
            'head_stylesheets' => [$this, 'block_head_stylesheets'],
            'head_scripts' => [$this, 'block_head_scripts'],
            'head_platform' => [$this, 'block_head_platform'],
            'head_overrides' => [$this, 'block_head_overrides'],
            'head_meta' => [$this, 'block_head_meta'],
            'head_title' => [$this, 'block_head_title'],
            'head_application' => [$this, 'block_head_application'],
            'head_ie_stylesheets' => [$this, 'block_head_ie_stylesheets'],
            'head' => [$this, 'block_head'],
            'head_custom' => [$this, 'block_head_custom'],
        ];
    }
 
    protected function doDisplay(array $context, array $blocks = [])
    {
        // line 1
        $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "debugger", []), "assets", [], "method");
        // line 2
        $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "theme", []), "loadAtoms", [], "method");
        // line 4
        $context["faEnabled"] = (($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "config", [], "any", false, true), "page", [], "any", false, true), "fontawesome", [], "any", false, true), "enable", [], "any", true, true)) ? (_twig_default_filter($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "config", [], "any", false, true), "page", [], "any", false, true), "fontawesome", [], "any", false, true), "enable", []), 1)) : (1));
        // line 5
        $context["faVersion"] = ((($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "config", [], "any", false, true), "page", [], "any", false, true), "fontawesome", [], "any", false, true), "version", [], "any", true, true) &&  !(null === $this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "config", [], "any", false, true), "page", [], "any", false, true), "fontawesome", [], "any", false, true), "version", [])))) ? ($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "config", [], "any", false, true), "page", [], "any", false, true), "fontawesome", [], "any", false, true), "version", [])) : (((($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "config", [], "any", false, true), "page", [], "any", false, true), "fontawesome", [], "any", false, true), "default_version", [], "any", true, true) &&  !(null === $this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "config", [], "any", false, true), "page", [], "any", false, true), "fontawesome", [], "any", false, true), "default_version", [])))) ? ($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "config", [], "any", false, true), "page", [], "any", false, true), "fontawesome", [], "any", false, true), "default_version", [])) : ("fa4"))));
        // line 6
        echo "
";
        // line 7
        $assetFunction = $this->env->getFunction('parse_assets')->getCallable();
        $assetVariables = ["priority" => 10];
        if ($assetVariables && !is_array($assetVariables)) {
            throw new UnexpectedValueException('{% scripts with x %}: x is not an array');
        }
        $location = "head";
        if ($location && !is_string($location)) {
            throw new UnexpectedValueException('{% scripts in x %}: x is not a string');
        }
        $priority = isset($assetVariables['priority']) ? $assetVariables['priority'] : 0;
        ob_start();
        // line 8
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
            $this->doDisplay($context, $blocks);
        } catch (Error $e) {
            if (!$e->getSourceContext()) {
                $e->setSourceContext($this->getSourceContext());
            }
 
            // this is mostly useful for \Twig\Error\LoaderError exceptions
            // see \Twig\Error\LoaderError
            if (-1 === $e->getTemplateLine()) {
                $e->guess();
            }
 
            throw $e;
        } catch (\Exception $e) {
            $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
            $e->guess();
 
            throw $e;
        }
    }
 
    {
        return $this;
    }
 
    /**
     * Returns all blocks.
     *
     * This method is for internal use only and should never be called
     * directly.
     *
     * @return array An array of blocks
     */
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Exception $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
        parent::__construct($env);
 
        $this->blocks = [
            'head_title' => [$this, 'block_head_title'],
            'head_application' => [$this, 'block_head_application'],
            'head_platform' => [$this, 'block_head_platform'],
            'head' => [$this, 'block_head'],
        ];
    }
 
    protected function doGetParent(array $context)
    {
        // line 1
        return "@nucleus/page_head.html.twig";
    }
 
    protected function doDisplay(array $context, array $blocks = [])
    {
        $this->parent = $this->loadTemplate("@nucleus/page_head.html.twig", "partials/page_head.html.twig", 1);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }
 
    // line 3
    public function block_head_title($context, array $blocks = [])
    {
        // line 4
        echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=";
        echo twig_escape_filter($this->env, $this->getAttribute(($context["site"] ?? null), "charset", []), "html", null, true);
        echo "\" />
    <link rel=\"profile\" href=\"http://gmpg.org/xfn/11\" />
    <link rel=\"pingback\" href=\"";
        // line 6
        echo twig_escape_filter($this->env, $this->getAttribute(($context["site"] ?? null), "pingback_url", []), "html", null, true);
        echo "\" />";
    }
 
    // line 9
    public function block_head_application($context, array $blocks = [])
    {
        // line 10
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
            $this->doDisplay($context, $blocks);
        } catch (Error $e) {
            if (!$e->getSourceContext()) {
                $e->setSourceContext($this->getSourceContext());
            }
 
            // this is mostly useful for \Twig\Error\LoaderError exceptions
            // see \Twig\Error\LoaderError
            if (-1 === $e->getTemplateLine()) {
                $e->guess();
            }
 
            throw $e;
        } catch (\Exception $e) {
            $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
            $e->guess();
 
            throw $e;
        }
    }
 
    {
        return $this;
    }
 
    /**
     * Returns all blocks.
     *
     * This method is for internal use only and should never be called
     * directly.
     *
     * @return array An array of blocks
     */
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Exception $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Exception $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
     * @internal
     */
    public function __construct(Environment $env, Template $template)
    {
        $this->env = $env;
        $this->template = $template;
    }
 
    /**
     * Renders the template.
     *
     * @param array $context An array of parameters to pass to the template
     *
     * @return string The rendered template
     */
    public function render($context = [])
    {
        // using func_get_args() allows to not expose the blocks argument
        // as it should only be used by internal code
        return $this->template->render($context, \func_num_args() > 1 ? func_get_arg(1) : []);
    }
 
    /**
     * Displays the template.
     *
     * @param array $context An array of parameters to pass to the template
     */
    public function display($context = [])
    {
        // using func_get_args() allows to not expose the blocks argument
        // as it should only be used by internal code
        $this->template->display($context, \func_num_args() > 1 ? func_get_arg(1) : []);
    }
 
    /**
     * Checks if a block is defined.
     *
     * @param string $name    The block name
     * @param array  $context An array of parameters to pass to the template
     *
        @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();
 *
 * 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 __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 Microsoft-IIS/10.0
REQUEST_URI /sample-page/
_FCGI_X_PIPE_ \\\\.\\pipe\\IISFCGI-0289eb01-6567-4e54-86f2-6759fecac58f
ALLUSERSPROFILE C:\\ProgramData
APPDATA C:\\Windows\\system32\\config\\systemprofile\\AppData\\Roaming
APP_POOL_CONFIG C:\\inetpub\\temp\\apppools\\sojournertruthhouse.org\\sojournertruthhouse.org.config
APP_POOL_ID sojournertruthhouse.org
CommonProgramFiles C:\\Program Files\\Common Files
CommonProgramFiles(x86) C:\\Program Files (x86)\\Common Files
CommonProgramW6432 C:\\Program Files\\Common Files
COMPUTERNAME WEB11
ComSpec C:\\Windows\\system32\\cmd.exe
LOCALAPPDATA C:\\Windows\\system32\\config\\systemprofile\\AppData\\Local
NUMBER_OF_PROCESSORS 3
OS Windows_NT
Path C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\php;C:\\Program Files\\MySQL\\MySQL Server 5.7\\bin;C:\\Windows\\system32\\config\\systemprofile\\AppData\\Local\\Microsoft\\WindowsApps
PATHEXT .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE AMD64
PROCESSOR_IDENTIFIER Intel64 Family 6 Model 79 Stepping 1, GenuineIntel
PROCESSOR_LEVEL 6
PROCESSOR_REVISION 4f01
ProgramData C:\\ProgramData
ProgramFiles C:\\Program Files
ProgramFiles(x86) C:\\Program Files (x86)
ProgramW6432 C:\\Program Files
PSModulePath C:\\Program Files\\WindowsPowerShell\\Modules;C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules
PUBLIC C:\\Users\\Public
SystemDrive C:
SystemRoot C:\\Windows
TEMP C:\\Windows\\TEMP
TMP C:\\Windows\\TEMP
USERDOMAIN WORKGROUP
USERNAME WEB11$
USERPROFILE C:\\Windows\\system32\\config\\systemprofile
windir C:\\Windows
ORIG_PATH_INFO /index.php
URL /index.php
SERVER_PROTOCOL HTTP/1.1
SERVER_PORT_SECURE 1
SERVER_PORT 443
SERVER_NAME sojournertruthhouse.org
SCRIPT_NAME /index.php
SCRIPT_FILENAME C:\\inetpub\\wwwroot\\sojournertruthhouse.org\\index.php
REQUEST_METHOD GET
REMOTE_USER
REMOTE_PORT 36062
REMOTE_HOST 3.135.192.97
REMOTE_ADDR 3.135.192.97
QUERY_STRING
PATH_TRANSLATED C:\\inetpub\\wwwroot\\sojournertruthhouse.org\\index.php
LOGON_USER
LOCAL_ADDR 192.168.6.8
INSTANCE_META_PATH /LM/W3SVC/3
INSTANCE_NAME SOJOURNERTRUTHHOUSE.ORG
INSTANCE_ID 3
HTTPS_SERVER_SUBJECT CN=sojournertruthhouse.org
HTTPS_SERVER_ISSUER C=US, S=Arizona, L=Scottsdale, O=\"GoDaddy.com, Inc.\", OU=http://certs.godaddy.com/repository/, CN=Go Daddy Secure Certificate Authority - G2
HTTPS_SECRETKEYSIZE 2048
HTTPS_KEYSIZE 256
HTTPS on
GATEWAY_INTERFACE CGI/1.1
DOCUMENT_ROOT C:\\inetpub\\wwwroot\\sojournertruthhouse.org
CONTENT_TYPE
CONTENT_LENGTH 0
CERT_SUBJECT
CERT_SERIALNUMBER
CERT_ISSUER
CERT_FLAGS
CERT_COOKIE
AUTH_USER
AUTH_PASSWORD
AUTH_TYPE
APPL_PHYSICAL_PATH C:\\inetpub\\wwwroot\\sojournertruthhouse.org\\
APPL_MD_PATH /LM/W3SVC/3/ROOT
IIS_UrlRewriteModule 7.1.1980.0
UNENCODED_URL /sample-page/
IIS_WasUrlRewritten 1
HTTP_X_ORIGINAL_URL /sample-page/
HTTP_USER_AGENT Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
HTTP_HOST sojournertruthhouse.org
HTTP_ACCEPT_ENCODING gzip, br, zstd, deflate
HTTP_ACCEPT */*
HTTP_CONTENT_LENGTH 0
HTTP_CONNECTION close
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1722048245.9854
REQUEST_TIME 1722048245
empty
0. Whoops\Handler\PrettyPageHandler