Twig \ Error \ RuntimeError
An exception has been thrown during the rendering of a template ("Failed to save file /var/www/vhosts/dteimpianti.it/httpdocs/wp-content/themes/rt_salient/custom/css-compiled/salient_azienda.css.map").
Previous exceptions
  • Failed to save file /var/www/vhosts/dteimpianti.it/httpdocs/wp-content/themes/rt_salient/custom/css-compiled/salient_azienda.css.map (0)
Twig\Error\RuntimeError thrown with message "An exception has been thrown during the rendering of a template ("Failed to save file /var/www/vhosts/dteimpianti.it/httpdocs/wp-content/themes/rt_salient/custom/css-compiled/salient_azienda.css.map")." Stacktrace: #30 Twig\Error\RuntimeError in /var/www/vhosts/dteimpianti.it/httpdocs/wp-content/plugins/gantry5/engines/nucleus/views/partials/page.html.twig:12 #29 RuntimeException in /var/www/vhosts/dteimpianti.it/httpdocs/wp-content/plugins/gantry5/vendor/rockettheme/toolbox/File/src/AbstractFile.php:374 #28 RocketTheme\Toolbox\File\AbstractFile:save in /var/www/vhosts/dteimpianti.it/httpdocs/wp-content/plugins/gantry5/src/classes/Gantry/Component/Stylesheet/ScssCompiler.php:331 #27 Gantry\Component\Stylesheet\ScssCompiler:compileLegacyFile in /var/www/vhosts/dteimpianti.it/httpdocs/wp-content/plugins/gantry5/src/classes/Gantry/Component/Stylesheet/ScssCompiler.php:133 #26 Gantry\Component\Stylesheet\ScssCompiler:compileFile in /var/www/vhosts/dteimpianti.it/httpdocs/wp-content/plugins/gantry5/src/classes/Gantry/Component/Theme/ThemeTrait.php:271 #25 Gantry\Framework\Theme:css in /var/www/vhosts/dteimpianti.it/httpdocs/wp-content/plugins/gantry5/src/classes/Gantry/Component/Content/Block/HtmlBlock.php:86 #24 Gantry\Component\Content\Block\HtmlBlock:getStyles in /var/www/vhosts/dteimpianti.it/httpdocs/wp-content/plugins/gantry5/src/classes/Gantry/Framework/Document.php:57 #23 Gantry\Framework\Document:registerStyles in /var/www/vhosts/dteimpianti.it/httpdocs/wp-content/plugins/gantry5/src/classes/Gantry/Framework/Document.php:50 #22 Gantry\Framework\Document:registerAssets in /var/www/vhosts/dteimpianti.it/httpdocs/wp-content/plugins/gantry5/src/classes/Gantry/Framework/Base/Platform.php:277 #21 Gantry\Framework\Base\Platform:finalize in /var/www/vhosts/dteimpianti.it/httpdocs/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Template.php:700 #20 Twig\Template:getAttribute in /var/www/vhosts/dteimpianti.it/httpdocs/wp-content/cache/gantry5/rt_salient/twig/bc/bcc5f51e3415caaa5d9c2655297ef52ac1752b348cbe410b62f3cd9746c013fa.php:63 #19 __TwigTemplate_c7a6fcc89a9de275c4dc4444637ac540f8cab6e0022f411bfb7a5c1efb789abf:block_page_footer in /var/www/vhosts/dteimpianti.it/httpdocs/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Template.php:214 #18 Twig\Template:displayBlock in /var/www/vhosts/dteimpianti.it/httpdocs/wp-content/cache/gantry5/rt_salient/twig/11/11992ae66a85f32a7bcfd1552b9af2a1633cc76d777b197f695dfca8d533f0aa.php:152 #17 __TwigTemplate_7c37c835f343fc97fa480d4dd016cfc3b915e593eea2b417e85c788584c65556:doDisplay in /var/www/vhosts/dteimpianti.it/httpdocs/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Template.php:453 #16 Twig\Template:displayWithErrorHandling in /var/www/vhosts/dteimpianti.it/httpdocs/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Template.php:420 #15 Twig\Template:display in /var/www/vhosts/dteimpianti.it/httpdocs/wp-content/cache/gantry5/rt_salient/twig/bc/bcc5f51e3415caaa5d9c2655297ef52ac1752b348cbe410b62f3cd9746c013fa.php:36 #14 __TwigTemplate_c7a6fcc89a9de275c4dc4444637ac540f8cab6e0022f411bfb7a5c1efb789abf:doDisplay in /var/www/vhosts/dteimpianti.it/httpdocs/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Template.php:453 #13 Twig\Template:displayWithErrorHandling in /var/www/vhosts/dteimpianti.it/httpdocs/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Template.php:420 #12 Twig\Template:display in /var/www/vhosts/dteimpianti.it/httpdocs/wp-content/cache/gantry5/rt_salient/twig/42/4298315f464815f432606574fd146cceb1df26ac85e1c949e7d1bf204c48cae0.php:40 #11 __TwigTemplate_1acf74e8cac7b8888038789d29b066e803bd7cefe6f44e0429a9daaafd1814fc:doDisplay in /var/www/vhosts/dteimpianti.it/httpdocs/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Template.php:453 #10 Twig\Template:displayWithErrorHandling in /var/www/vhosts/dteimpianti.it/httpdocs/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Template.php:420 #9 Twig\Template:display in /var/www/vhosts/dteimpianti.it/httpdocs/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/Template.php:432 #8 Twig\Template:render in /var/www/vhosts/dteimpianti.it/httpdocs/wp-content/plugins/gantry5/compat/vendor/twig/twig/src/TemplateWrapper.php:47 #7 Twig\TemplateWrapper:render in /var/www/vhosts/dteimpianti.it/httpdocs/wp-content/plugins/gantry5/vendor/timber/timber/lib/Loader.php:79 #6 Timber\Loader:render in /var/www/vhosts/dteimpianti.it/httpdocs/wp-content/plugins/gantry5/vendor/timber/timber/lib/Timber.php:334 #5 Timber\Timber:compile in /var/www/vhosts/dteimpianti.it/httpdocs/wp-content/plugins/gantry5/vendor/timber/timber/lib/Timber.php:383 #4 Timber\Timber:fetch in /var/www/vhosts/dteimpianti.it/httpdocs/wp-content/plugins/gantry5/vendor/timber/timber/lib/Timber.php:410 #3 Timber\Timber:render in /var/www/vhosts/dteimpianti.it/httpdocs/wp-content/themes/rt_salient/index.php:69 #2 include in /var/www/vhosts/dteimpianti.it/httpdocs/wp-includes/template-loader.php:106 #1 require_once in /var/www/vhosts/dteimpianti.it/httpdocs/wp-blog-header.php:19 #0 require in /var/www/vhosts/dteimpianti.it/httpdocs/index.php:17
Stack frames (31)
30
Twig\Error\RuntimeError
/engines/nucleus/views/partials/page.html.twig12
29
RuntimeException
/vendor/rockettheme/toolbox/File/src/AbstractFile.php374
28
RocketTheme\Toolbox\File\AbstractFile save
/src/classes/Gantry/Component/Stylesheet/ScssCompiler.php331
27
Gantry\Component\Stylesheet\ScssCompiler compileLegacyFile
/src/classes/Gantry/Component/Stylesheet/ScssCompiler.php133
26
Gantry\Component\Stylesheet\ScssCompiler compileFile
/src/classes/Gantry/Component/Theme/ThemeTrait.php271
25
Gantry\Framework\Theme css
/src/classes/Gantry/Component/Content/Block/HtmlBlock.php86
24
Gantry\Component\Content\Block\HtmlBlock getStyles
/src/classes/Gantry/Framework/Document.php57
23
Gantry\Framework\Document registerStyles
/src/classes/Gantry/Framework/Document.php50
22
Gantry\Framework\Document registerAssets
/src/classes/Gantry/Framework/Base/Platform.php277
21
Gantry\Framework\Base\Platform finalize
/compat/vendor/twig/twig/src/Template.php700
20
Twig\Template getAttribute
/var/www/vhosts/dteimpianti.it/httpdocs/wp-content/cache/gantry5/rt_salient/twig/bc/bcc5f51e3415caaa5d9c2655297ef52ac1752b348cbe410b62f3cd9746c013fa.php63
19
__TwigTemplate_c7a6fcc89a9de275c4dc4444637ac540f8cab6e0022f411bfb7a5c1efb789abf block_page_footer
/compat/vendor/twig/twig/src/Template.php214
18
Twig\Template displayBlock
/var/www/vhosts/dteimpianti.it/httpdocs/wp-content/cache/gantry5/rt_salient/twig/11/11992ae66a85f32a7bcfd1552b9af2a1633cc76d777b197f695dfca8d533f0aa.php152
17
__TwigTemplate_7c37c835f343fc97fa480d4dd016cfc3b915e593eea2b417e85c788584c65556 doDisplay
/compat/vendor/twig/twig/src/Template.php453
16
Twig\Template displayWithErrorHandling
/compat/vendor/twig/twig/src/Template.php420
15
Twig\Template display
/var/www/vhosts/dteimpianti.it/httpdocs/wp-content/cache/gantry5/rt_salient/twig/bc/bcc5f51e3415caaa5d9c2655297ef52ac1752b348cbe410b62f3cd9746c013fa.php36
14
__TwigTemplate_c7a6fcc89a9de275c4dc4444637ac540f8cab6e0022f411bfb7a5c1efb789abf doDisplay
/compat/vendor/twig/twig/src/Template.php453
13
Twig\Template displayWithErrorHandling
/compat/vendor/twig/twig/src/Template.php420
12
Twig\Template display
/var/www/vhosts/dteimpianti.it/httpdocs/wp-content/cache/gantry5/rt_salient/twig/42/4298315f464815f432606574fd146cceb1df26ac85e1c949e7d1bf204c48cae0.php40
11
__TwigTemplate_1acf74e8cac7b8888038789d29b066e803bd7cefe6f44e0429a9daaafd1814fc doDisplay
/compat/vendor/twig/twig/src/Template.php453
10
Twig\Template displayWithErrorHandling
/compat/vendor/twig/twig/src/Template.php420
9
Twig\Template display
/compat/vendor/twig/twig/src/Template.php432
8
Twig\Template render
/compat/vendor/twig/twig/src/TemplateWrapper.php47
7
Twig\TemplateWrapper render
/vendor/timber/timber/lib/Loader.php79
6
Timber\Loader render
/vendor/timber/timber/lib/Timber.php334
5
Timber\Timber compile
/vendor/timber/timber/lib/Timber.php383
4
Timber\Timber fetch
/vendor/timber/timber/lib/Timber.php410
3
Timber\Timber render
/var/www/vhosts/dteimpianti.it/httpdocs/wp-content/themes/rt_salient/index.php69
2
include
/var/www/vhosts/dteimpianti.it/httpdocs/wp-includes/template-loader.php106
1
require_once
/var/www/vhosts/dteimpianti.it/httpdocs/wp-blog-header.php19
0
require
/var/www/vhosts/dteimpianti.it/httpdocs/index.php17
{% extends "@nucleus/page.html.twig" %}
 
{% block page_head -%}
    {% if page_head %}
        {{ page_head|raw }}
    {% else %}
        {{ parent() }}
    {% endif %}
{%- endblock %}
 
{% block page_footer %}
    {% do gantry.platform.finalize() %}
    {{ wp_footer|raw }}
{% endblock %}
 
                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 /var/www/vhosts/dteimpianti.it/httpdocs/wp-content/themes/rt_salient/custom/css-compiled/salient_azienda.css.map
            throw new \RuntimeException("CSS Compilation on file '{$in}.scss' failed on error: {$e->getMessage()}", 500, $e);
        }
        if (strpos($css, $scss) === 0) {
            $css = '/* ' . $scss . ' */';
        }
 
        // Extract map from css and save it as separate file.
        if ($pos = strrpos($css, '/*# sourceMappingURL=')) {
            $map = json_decode(urldecode(substr($css, $pos + 43, -3)), true);
 
            /** @var Document $document */
            $document = $gantry['document'];
 
            foreach ($map['sources'] as &$source) {
                $source = $document->url($source, false, -1);
            }
            unset($source);
 
            $mapFile = JsonFile::instance($path . '.map');
            $mapFile->save($map);
            $mapFile->free();
 
            $css = substr($css, 0, $pos) . '/*# sourceMappingURL=' . Gantry::basename($out) . '.map */';
        }
 
 
        $warnings = preg_replace('/\n +(\w)/mu', '\1', ob_get_clean());
        if ($warnings) {
            $warnings = explode("\n\n", $warnings);
            foreach ($warnings as $i => $warning) {
                if ($warning === '') {
                    unset($warnings[$i]);
                    continue;
                }
                if (strpos($warning, '[Bourbon] [Deprecation]') !== false) {
                    if (\GANTRY_DEBUGGER) {
                        Debugger::addMessage("{$in}: {$warning}", 'deprecated');
                    }
                    if (static::$options['deprecations']) {
                        unset($warnings[$i]);
    public function reset()
    {
        $this->functions->reset();
 
        return $this;
    }
 
    public function resetCache()
    {
    }
 
    /**
     * @param string $in    Filename without path or extension.
     * @return bool         True if the output file was saved.
     * @throws \RuntimeException
     */
    public function compileFile($in)
    {
        if (isset(static::$options['legacy'][$in])) {
            return $this->compileLegacyFile($in);
        }
 
        // Buy some extra time as compilation may take a lot of time in shared environments.
        @set_time_limit(30);
        @set_time_limit(60);
        @set_time_limit(90);
        @set_time_limit(120);
 
        $this->result = null;
        $this->includedFiles = [];
 
        $gantry = Gantry::instance();
 
        /** @var UniformResourceLocator $locator */
        $locator = $gantry['locator'];
 
        $out = $this->getCssUrl($in);
        /** @var string $path */
        $path = $locator->findResource($out, true, true);
        $file = File::instance($path);
    /**
     * Returns URL to CSS file.
     *
     * If file does not exist, it will be created by using CSS compiler.
     *
     * @param string $name
     * @return string
     */
    public function css($name)
    {
        if (!isset($this->cssCache[$name])) {
            $compiler = $this->compiler();
 
            if ($compiler->needsCompile($name, [$this, 'getCssVariables'])) {
                if (\GANTRY_DEBUGGER) {
                    Debugger::startTimer("css-{$name}", "Compiling CSS: {$name}");
                    Debugger::addMessage("Compiling CSS: {$name}");
                }
 
                $compiler->compileFile($name);
 
                if (\GANTRY_DEBUGGER) {
                    Debugger::stopTimer("css-{$name}");
                }
            }
 
            $this->cssCache[$name] = $compiler->getCssUrl($name);
        }
 
        return $this->cssCache[$name];
    }
 
    /**
     * @return array
     */
    public function getCssVariables()
    {
        if ($this->preset) {
            $variables = $this->presets()->flatten($this->preset . '.styles', '-');
        } else {
        $styles = $this->getAssetsInLocation('styles', $location);
 
        if (!$styles) {
            return [];
        }
 
        $gantry = Gantry::instance();
 
        /** @var Theme|null $theme */
        $theme = isset($gantry['theme']) ? $gantry['theme'] : null;
 
        /** @var Document $document */
        $document = $gantry['document'];
 
        foreach ($styles as $key => $style) {
            if (isset($style['href'])) {
                $url = $style['href'];
                if ($theme && preg_match('|\.scss$|', $url)) {
                    // Compile SCSS files.
                    $url = $theme->css(Gantry::basename($url, '.scss'));
                }
                // Deal with streams and relative paths.
                $url = $document::url($url, null, null, false);
 
                $styles[$key]['href'] = $url;
            }
        }
 
        return $styles;
    }
 
    /**
     * @param string $location
     * @return array
     * @since 5.4.3
     */
    public function getScripts($location = 'head')
    {
        $scripts = $this->getAssetsInLocation('scripts', $location);
 
        'bootstrap.5' => 'registerBootstrap5',
        'mootools' => 'registerMootools',
        'mootools.framework' => 'registerMootools',
        'mootools.core' => 'registerMootools',
        'mootools.more' => 'registerMootoolsMore',
        'lightcase' => 'registerLightcase',
        'lightcase.init' => 'registerLightcaseInit',
    ];
 
    public static function registerAssets()
    {
        static::registerFrameworks();
        static::registerStyles();
        static::registerScripts('head');
        static::registerScripts('footer');
    }
 
    public static function registerStyles()
    {
        $styles = static::$stack[0]->getStyles();
 
        foreach ($styles as $style) {
            switch ($style[':type']) {
                case 'file':
                    $array = explode('?', $style['href']);
                    $href = array_shift($array);
                    $version = array_shift($array) ?: false;
                    $name = isset($style['id']) ? $style['id'] : Gantry::basename($href, '.css');
                    if (strpos($version, '=')) {
                        $href .= '?' . $version;
                        $version = null;
                    }
                    \wp_enqueue_style($name, $href, [], $version, $style['media']);
                    break;
                case 'inline':
                    $type = !empty($style['type']) ? $style['type'] : 'text/css';
                    self::$wp_styles[] = "<style type=\"{$type}\">{$style['content']}</style>";
                    break;
            }
        }
        'jquery' => 'registerJquery',
        'jquery.framework' => 'registerJquery',
        'jquery.ui.core' => 'registerJqueryUiCore',
        'jquery.ui.sortable' => 'registerJqueryUiSortable',
        'bootstrap.2' => 'registerBootstrap2',
        'bootstrap.3' => 'registerBootstrap3',
        'bootstrap.4' => 'registerBootstrap4',
        'bootstrap.5' => 'registerBootstrap5',
        'mootools' => 'registerMootools',
        'mootools.framework' => 'registerMootools',
        'mootools.core' => 'registerMootools',
        'mootools.more' => 'registerMootoolsMore',
        'lightcase' => 'registerLightcase',
        'lightcase.init' => 'registerLightcaseInit',
    ];
 
    public static function registerAssets()
    {
        static::registerFrameworks();
        static::registerStyles();
        static::registerScripts('head');
        static::registerScripts('footer');
    }
 
    public static function registerStyles()
    {
        $styles = static::$stack[0]->getStyles();
 
        foreach ($styles as $style) {
            switch ($style[':type']) {
                case 'file':
                    $array = explode('?', $style['href']);
                    $href = array_shift($array);
                    $version = array_shift($array) ?: false;
                    $name = isset($style['id']) ? $style['id'] : Gantry::basename($href, '.css');
                    if (strpos($version, '=')) {
                        $href .= '?' . $version;
                        $version = null;
                    }
                    \wp_enqueue_style($name, $href, [], $version, $style['media']);
    {
        return null;
    }
 
    /**
     * @param string $text
     * @return string
     */
    public function filter($text)
    {
        return $text;
    }
 
    public function finalize()
    {
        $gantry = Gantry::instance();
        /** @var Document $document */
        $document = $gantry['document'];
 
        $document::registerAssets();
    }
 
    /**
     * @return mixed|null
     */
    public function call()
    {
        $args = func_get_args();
        $callable = array_shift($args);
        return is_callable($callable) ? call_user_func_array($callable, $args) : null;
    }
 
    /**
     * @param string $action
     * @param int|string|null $id
     * @return bool
     */
    public function authorize($action, $id = null)
    {
        return true;
            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());
            // line 5
            echo "        ";
            echo ($context["page_head"] ?? null);
            echo "
    ";
        } else {
            // line 7
            echo "        ";
            $this->displayParentBlock("page_head", $context, $blocks);
            echo "
    ";
        }
    }
 
    // line 11
    public function block_page_footer($context, array $blocks = [])
    {
        // line 12
        echo "    ";
        $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "platform", []), "finalize", [], "method");
        // line 13
        echo "    ";
        echo ($context["wp_footer"] ?? null);
        echo "
";
    }
 
    public function getTemplateName()
    {
        return "partials/page.html.twig";
    }
 
    public function isTraitable()
    {
        return false;
    }
 
    public function getDebugInfo()
    {
        return array (  65 => 13,  62 => 12,  59 => 11,  51 => 7,  45 => 5,  43 => 4,  40 => 3,  30 => 1,);
 
        if ($useBlocks && isset($blocks[$name])) {
            $template = $blocks[$name][0];
            $block = $blocks[$name][1];
        } elseif (isset($this->blocks[$name])) {
            $template = $this->blocks[$name][0];
            $block = $this->blocks[$name][1];
        } else {
            $template = null;
            $block = null;
        }
 
        // avoid RCEs when sandbox is enabled
        if (null !== $template && !$template instanceof self) {
            throw new \LogicException('A block must be a method on a \Twig\Template instance.');
        }
 
        if (null !== $template) {
            try {
                $template->$block($context, $blocks);
            } catch (Error $e) {
                if (!$e->getSourceContext()) {
                    $e->setSourceContext($template->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, $template->getSourceContext(), $e);
                $e->guess();
 
                throw $e;
            }
        } elseif (false !== $parent = $this->getParent($context)) {
            $parent->displayBlock($name, $context, array_merge($this->blocks, $blocks), false);
        // line 62
        echo "    ";
        echo twig_join_filter($this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "document", []), "getHtml", [0 => "body_bottom"], "method"), "
    ");
        echo "
";
        $context["body_bottom"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset());
        // line 65
        $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "document", []), "addScript", [0 => $this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc("gantry-assets://js/main.js"), 1 => 11, 2 => "footer"], "method");
        // line 69
        ob_start(function () { return ''; });
        // line 70
        echo "    ";
        $this->displayBlock('page_head', $context, $blocks);
        $context["page_head"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset());
        // line 75
        ob_start(function () { return ''; });
        // line 76
        echo "    ";
        $this->displayBlock('page_footer', $context, $blocks);
        // line 80
        echo "
    ";
        // line 81
        echo $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "debugger", []), "render", [], "method");
        echo "
";
        $context["page_footer"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset());
        // line 84
        $this->displayBlock('page', $context, $blocks);
    }
 
    // line 8
    public function block_content($context, array $blocks = [])
    {
        // line 9
        echo "        ";
    }
 
    // line 21
            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 __construct(Environment $env)
    {
        parent::__construct($env);
 
        $this->blocks = [
            'page_head' => [$this, 'block_page_head'],
            'page_footer' => [$this, 'block_page_footer'],
        ];
    }
 
    protected function doGetParent(array $context)
    {
        // line 1
        return "@nucleus/page.html.twig";
    }
 
    protected function doDisplay(array $context, array $blocks = [])
    {
        $this->parent = $this->loadTemplate("@nucleus/page.html.twig", "partials/page.html.twig", 1);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }
 
    // line 3
    public function block_page_head($context, array $blocks = [])
    {
        // line 4
        if (($context["page_head"] ?? null)) {
            // line 5
            echo "        ";
            echo ($context["page_head"] ?? null);
            echo "
    ";
        } else {
            // line 7
            echo "        ";
            $this->displayParentBlock("page_head", $context, $blocks);
            echo "
    ";
        }
    }
            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) {
        $this->blocks = [
            'content' => [$this, 'block_content'],
        ];
    }
 
    protected function doGetParent(array $context)
    {
        // line 1
        return "partials/page.html.twig";
    }
 
    protected function doDisplay(array $context, array $blocks = [])
    {
        // line 2
        $context["twigTemplate"] = "index.html.twig";
        // line 3
        $context["scope"] = "blog";
        // line 1
        $this->parent = $this->loadTemplate("partials/page.html.twig", "index.html.twig", 1);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }
 
    // line 5
    public function block_content($context, array $blocks = [])
    {
        // line 6
        echo "
    <div class=\"platform-content\">
        <div class=\"blog\">
 
            ";
        // line 11
        echo "            ";
        if (($this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "config", []), "get", [0 => (("content." . ($context["scope"] ?? null)) . ".heading.enabled"), 1 => "0"], "method") &&  !twig_test_empty($this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "config", []), "get", [0 => (("content." . ($context["scope"] ?? null)) . ".heading.text")], "method")))) {
            // line 12
            echo "                <header class=\"page-header\">
                    <h1>
                        ";
            // line 14
            echo $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "config", []), "get", [0 => (("content." . ($context["scope"] ?? null)) . ".heading.text")], "method");
            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
     *
 
        $key = null;
        $output = false;
        if ( false !== $expires ) {
            ksort($data);
            $key = md5($file.json_encode($data));
            $output = $this->get_cache($key, self::CACHEGROUP, $cache_mode);
        }
 
        if ( false === $output || null === $output ) {
            $twig = $this->get_twig();
            if ( strlen($file) ) {
                $loader = $this->get_loader();
                $result = $loader->getCacheKey($file);
                do_action('timber_loader_render_file', $result);
            }
            $data = apply_filters('timber_loader_render_data', $data);
            $data = apply_filters('timber/loader/render_data', $data, $file);
            $template = $twig->load($file);
            $output = $template->render($data);
        }
 
        if ( false !== $output && false !== $expires && null !== $key ) {
            $this->delete_cache();
            $this->set_cache($key, $output, self::CACHEGROUP, $expires, $cache_mode);
        }
        $output = apply_filters('timber_output', $output);
        return apply_filters('timber/output', $output, $data, $file);
    }
 
    protected function delete_cache() {
        Cleaner::delete_transients();
    }
 
    /**
     * Get first existing template.
     *
     * @param array|string $templates  Name(s) of the Twig template(s) to choose from.
     * @return string|bool             Name of chosen template, otherwise false.
     */
        if ( $via_render ) {
            $file = apply_filters('timber_render_file', $file);
        } else {
            $file = apply_filters('timber_compile_file', $file);
        }
 
        $output = false;
 
        if ($file !== false) {
            if ( is_null($data) ) {
                $data = array();
            }
 
            if ( $via_render ) {
                $data = apply_filters('timber_render_data', $data);
            } else {
                $data = apply_filters('timber_compile_data', $data);
            }
 
            $output = $loader->render($file, $data, $expires, $cache_mode);
        } else {
            if ( is_array($filenames) ) {
                $filenames = implode(", ", $filenames);
            }
            Helper::error_log( 'Error loading your template files: '.$filenames.'. Make sure one of these files exists.' );
        }
 
        do_action('timber_compile_done');
        return $output;
    }
 
    /**
     * Compile a string.
     *
     * @api
     * @example
     * ```php
     * $data = array(
     *     'username' => 'Jane Doe',
     * );
        $twig = $dummy_loader->get_twig();
        $template = $twig->createTemplate($string);
        return $template->render($data);
    }
 
    /**
     * Fetch function.
     *
     * @api
     * @param array|string $filenames  Name of the Twig file to render. If this is an array of files, Timber will
     *                                 render the first file that exists.
     * @param array        $data       Optional. An array of data to use in Twig template.
     * @param bool|int     $expires    Optional. In seconds. Use false to disable cache altogether. When passed an
     *                                 array, the first value is used for non-logged in visitors, the second for users.
     *                                 Default false.
     * @param string       $cache_mode Optional. Any of the cache mode constants defined in TimberLoader.
     * @return bool|string The returned output.
     */
    public static function fetch( $filenames, $data = array(), $expires = false, $cache_mode = Loader::CACHE_USE_DEFAULT ) {
        $output = self::compile($filenames, $data, $expires, $cache_mode, true);
        $output = apply_filters('timber_compile_result', $output);
        return $output;
    }
 
    /**
     * Render function.
     *
     * Passes data to a Twig file and echoes the output.
     *
     * @api
     * @example
     * ```php
     * $context = Timber::context();
     *
     * Timber::render( 'index.twig', $context );
     * ```
     * @param array|string $filenames  Name of the Twig file to render. If this is an array of files, Timber will
     *                                 render the first file that exists.
     * @param array        $data       Optional. An array of data to use in Twig template.
     * @param bool|int     $expires    Optional. In seconds. Use false to disable cache altogether. When passed an
     * Passes data to a Twig file and echoes the output.
     *
     * @api
     * @example
     * ```php
     * $context = Timber::context();
     *
     * Timber::render( 'index.twig', $context );
     * ```
     * @param array|string $filenames  Name of the Twig file to render. If this is an array of files, Timber will
     *                                 render the first file that exists.
     * @param array        $data       Optional. An array of data to use in Twig template.
     * @param bool|int     $expires    Optional. In seconds. Use false to disable cache altogether. When passed an
     *                                 array, the first value is used for non-logged in visitors, the second for users.
     *                                 Default false.
     * @param string       $cache_mode Optional. Any of the cache mode constants defined in TimberLoader.
     * @return bool|string The echoed output.
     */
    public static function render( $filenames, $data = array(), $expires = false, $cache_mode = Loader::CACHE_USE_DEFAULT ) {
        $output = self::fetch($filenames, $data, $expires, $cache_mode);
        echo $output;
        return $output;
    }
 
    /**
     * Render a string with Twig variables.
     *
     * @api
     * @example
     * ```php
     * $data = array(
     *     'username' => 'Jane Doe',
     * );
     *
     * Timber::render_string( 'Hi {{ username }}, I’m a string with a custom Twig variable', $data );
     * ```
     * @param string $string A string with Twig variables.
     * @param array  $data   An array of data to use in Twig template.
     * @return bool|string
     */
        $new_exclude[] = '-' . $exclude;
    }
    $cat = implode(',', $new_exclude);
}
 
// Override the main query only when $cat variable is not empty
if ($cat != '') {
    query_posts(['cat' => $cat, 'paged' => $paged]);
}
 
$context['posts']      = Timber::get_posts();
$context['pagination'] = Timber::get_pagination();
 
$templates = ['index.html.twig'];
 
if (is_home()) {
    array_unshift($templates, 'home.html.twig');
}
 
Timber::render($templates, $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
Key Value
pll_language it
empty
Key Value
SERVER_SOFTWARE Apache
REQUEST_URI /chi-siamo/
USER dteimpianti_2022v1it
HOME /var/www/vhosts/dteimpianti.it
SCRIPT_NAME /index.php
QUERY_STRING
REQUEST_METHOD GET
SERVER_PROTOCOL HTTP/1.0
GATEWAY_INTERFACE CGI/1.1
REDIRECT_URL /chi-siamo/
REMOTE_PORT 39810
SCRIPT_FILENAME /var/www/vhosts/dteimpianti.it/httpdocs/index.php
SERVER_ADMIN [no address given]
CONTEXT_DOCUMENT_ROOT /var/www/vhosts/dteimpianti.it/httpdocs
CONTEXT_PREFIX
REQUEST_SCHEME http
DOCUMENT_ROOT /var/www/vhosts/dteimpianti.it/httpdocs
REMOTE_ADDR 13.59.133.194
SERVER_PORT 80
SERVER_ADDR 10.10.0.6
SERVER_NAME www.dteimpianti.it
SERVER_SIGNATURE <address>Apache Server at www.dteimpianti.it Port 80</address>
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
HTTP_COOKIE pll_language=it
HTTP_REFERER http://www.dteimpianti.it/chi-siamo
HTTP_ACCEPT_ENCODING gzip, br, zstd, deflate
HTTP_USER_AGENT Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
HTTP_ACCEPT */*
HTTP_CONNECTION close
HTTP_X_ACCEL_INTERNAL /internal-nginx-static-location
HTTP_X_REAL_IP 13.59.133.194
HTTP_HOST www.dteimpianti.it
proxy-nokeepalive 1
HTTP_AUTHORIZATION
SCRIPT_URI http://www.dteimpianti.it/chi-siamo/
SCRIPT_URL /chi-siamo/
UNIQUE_ID Z2bBfqEx6D9q3wA-AxPEPwAAAAs
REDIRECT_STATUS 200
REDIRECT_HTTP_AUTHORIZATION
REDIRECT_SCRIPT_URI http://www.dteimpianti.it/chi-siamo/
REDIRECT_SCRIPT_URL /chi-siamo/
REDIRECT_UNIQUE_ID Z2bBfqEx6D9q3wA-AxPEPwAAAAs
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1734787454.1171
REQUEST_TIME 1734787454
empty
0. Whoops\Handler\PrettyPageHandler