Warning: count(): Parameter must be an array or an object that implements Countable in /home/municace/public_html/plugins/system/gantry/gantry.php on line 403
Crikey! There was an error...
Twig \ Error \ RuntimeError
An exception has been thrown during the rendering of a template ("Failed to save file /home/municace/public_html/cache/gantry5/g5_helium/compiled/config/6cb24e8cb55a3ebf9f96d354c0722401.php").
Previous exceptions
  • Failed to save file /home/municace/public_html/cache/gantry5/g5_helium/compiled/config/6cb24e8cb55a3ebf9f96d354c0722401.php (0)
Twig\Error\RuntimeError thrown with message "An exception has been thrown during the rendering of a template ("Failed to save file /home/municace/public_html/cache/gantry5/g5_helium/compiled/config/6cb24e8cb55a3ebf9f96d354c0722401.php")." Stacktrace: #31 Twig\Error\RuntimeError in /home/municace/public_html/media/gantry5/engines/nucleus/templates/page.html.twig:3 #30 RuntimeException in /home/municace/public_html/libraries/gantry5/vendor/rockettheme/toolbox/File/src/File.php:351 #29 RocketTheme\Toolbox\File\File:save in /home/municace/public_html/libraries/gantry5/vendor/rockettheme/toolbox/File/src/PhpFile.php:31 #28 RocketTheme\Toolbox\File\PhpFile:save in /home/municace/public_html/libraries/gantry5/classes/Gantry/Component/Config/CompiledBase.php:263 #27 Gantry\Component\Config\CompiledBase:saveCompiledFile in /home/municace/public_html/libraries/gantry5/classes/Gantry/Component/Config/CompiledBase.php:109 #26 Gantry\Component\Config\CompiledBase:load in /home/municace/public_html/libraries/gantry5/classes/Gantry/Component/Config/CompiledConfig.php:79 #25 Gantry\Component\Config\CompiledConfig:load in /home/municace/public_html/libraries/gantry5/classes/Gantry/Framework/Services/ConfigServiceProvider.php:104 #24 Gantry\Framework\Services\ConfigServiceProvider:load in /home/municace/public_html/libraries/gantry5/classes/Gantry/Framework/Services/ConfigServiceProvider.php:49 #23 Gantry\Framework\Services\ConfigServiceProvider:Gantry\Framework\Services\{closure} in /home/municace/public_html/libraries/gantry5/vendor/pimple/pimple/src/Pimple/Container.php:118 #22 Pimple\Container:offsetGet in /home/municace/public_html/libraries/gantry5/classes/Gantry/Component/Theme/ThemeTrait.php:360 #21 Gantry\Framework\Theme:loadAtoms in /home/municace/public_html/libraries/gantry5/vendor/twig/twig/src/Template.php:702 #20 Twig\Template:getAttribute in /home/municace/public_html/cache/gantry5/g5_helium/twig/33/3361a5dceabb67be39264f5a46d65e24feaa19c0a03aa5be0568121aabf315d7.php:45 #19 __TwigTemplate_bc47bdf98c8dde47842b3e81a0e920953d9566b276f7f6bf2ad8bc3bea15d30a:doDisplay in /home/municace/public_html/libraries/gantry5/vendor/twig/twig/src/Template.php:455 #18 Twig\Template:displayWithErrorHandling in /home/municace/public_html/libraries/gantry5/vendor/twig/twig/src/Template.php:422 #17 Twig\Template:display in /home/municace/public_html/cache/gantry5/g5_helium/twig/58/58f0bd8ca2d41e8695d1055986da5249c4d425a9242d8c2608150b94ce699e51.php:35 #16 __TwigTemplate_aa734105e631d59b77ef7775665b0977353255159020107591eddfd7aaeb0bca:doDisplay in /home/municace/public_html/libraries/gantry5/vendor/twig/twig/src/Template.php:455 #15 Twig\Template:displayWithErrorHandling in /home/municace/public_html/libraries/gantry5/vendor/twig/twig/src/Template.php:422 #14 Twig\Template:display in /home/municace/public_html/cache/gantry5/g5_helium/twig/69/69947d9d3ac6f2f9e4b7845073d2d14983f97394657a66634518227bb71a5e61.php:35 #13 __TwigTemplate_4d6a8cb46bcbed74f95923ac535266fc3fdca3bacc32cbd636c1fa2c3bc8f1c3:doDisplay in /home/municace/public_html/libraries/gantry5/vendor/twig/twig/src/Template.php:455 #12 Twig\Template:displayWithErrorHandling in /home/municace/public_html/libraries/gantry5/vendor/twig/twig/src/Template.php:422 #11 Twig\Template:display in /home/municace/public_html/libraries/gantry5/vendor/twig/twig/src/Template.php:434 #10 Twig\Template:render in /home/municace/public_html/libraries/gantry5/vendor/twig/twig/src/TemplateWrapper.php:47 #9 Twig\TemplateWrapper:render in /home/municace/public_html/libraries/gantry5/vendor/twig/twig/src/Environment.php:384 #8 Twig\Environment:render in /home/municace/public_html/libraries/gantry5/classes/Gantry/Component/Theme/AbstractTheme.php:163 #7 Gantry\Component\Theme\AbstractTheme:render in /home/municace/public_html/templates/g5_helium/index.php:23 #6 require in /home/municace/public_html/libraries/src/Document/HtmlDocument.php:658 #5 Joomla\CMS\Document\HtmlDocument:_loadTemplate in /home/municace/public_html/libraries/src/Document/HtmlDocument.php:720 #4 Joomla\CMS\Document\HtmlDocument:_fetchTemplate in /home/municace/public_html/libraries/src/Document/HtmlDocument.php:535 #3 Joomla\CMS\Document\HtmlDocument:parse in /home/municace/public_html/libraries/src/Application/CMSApplication.php:1030 #2 Joomla\CMS\Application\CMSApplication:render in /home/municace/public_html/libraries/src/Application/SiteApplication.php:778 #1 Joomla\CMS\Application\SiteApplication:render in /home/municace/public_html/libraries/src/Application/CMSApplication.php:202 #0 Joomla\CMS\Application\CMSApplication:execute in /home/municace/public_html/index.php:49
Stack frames (32)
31
Twig
\
Error
\
RuntimeError
/
home
/
municace
/
public_html
/
media
/
gantry5
/
engines
/
nucleus
/
templates
/
page.html.twig
3
30
RuntimeException
/
vendor
/
rockettheme
/
toolbox
/
File
/
src
/
File.php
351
29
RocketTheme
\
Toolbox
\
File
\
File
save
/
vendor
/
rockettheme
/
toolbox
/
File
/
src
/
PhpFile.php
31
28
RocketTheme
\
Toolbox
\
File
\
PhpFile
save
/
classes
/
Gantry
/
Component
/
Config
/
CompiledBase.php
263
27
Gantry
\
Component
\
Config
\
CompiledBase
saveCompiledFile
/
classes
/
Gantry
/
Component
/
Config
/
CompiledBase.php
109
26
Gantry
\
Component
\
Config
\
CompiledBase
load
/
classes
/
Gantry
/
Component
/
Config
/
CompiledConfig.php
79
25
Gantry
\
Component
\
Config
\
CompiledConfig
load
/
classes
/
Gantry
/
Framework
/
Services
/
ConfigServiceProvider.php
104
24
Gantry
\
Framework
\
Services
\
ConfigServiceProvider
load
/
classes
/
Gantry
/
Framework
/
Services
/
ConfigServiceProvider.php
49
23
Gantry
\
Framework
\
Services
\
ConfigServiceProvider
Gantry
\
Framework
\
Services
\
{closure}
/
vendor
/
pimple
/
pimple
/
src
/
Pimple
/
Container.php
118
22
Pimple
\
Container
offsetGet
/
classes
/
Gantry
/
Component
/
Theme
/
ThemeTrait.php
360
21
Gantry
\
Framework
\
Theme
loadAtoms
/
vendor
/
twig
/
twig
/
src
/
Template.php
702
20
Twig
\
Template
getAttribute
/
home
/
municace
/
public_html
/
cache
/
gantry5
/
g5_helium
/
twig
/
33
/
3361a5dceabb67be39264f5a46d65e24feaa19c0a03aa5be0568121aabf315d7.php
45
19
__TwigTemplate_bc47bdf98c8dde47842b3e81a0e920953d9566b276f7f6bf2ad8bc3bea15d30a
doDisplay
/
vendor
/
twig
/
twig
/
src
/
Template.php
455
18
Twig
\
Template
displayWithErrorHandling
/
vendor
/
twig
/
twig
/
src
/
Template.php
422
17
Twig
\
Template
display
/
home
/
municace
/
public_html
/
cache
/
gantry5
/
g5_helium
/
twig
/
58
/
58f0bd8ca2d41e8695d1055986da5249c4d425a9242d8c2608150b94ce699e51.php
35
16
__TwigTemplate_aa734105e631d59b77ef7775665b0977353255159020107591eddfd7aaeb0bca
doDisplay
/
vendor
/
twig
/
twig
/
src
/
Template.php
455
15
Twig
\
Template
displayWithErrorHandling
/
vendor
/
twig
/
twig
/
src
/
Template.php
422
14
Twig
\
Template
display
/
home
/
municace
/
public_html
/
cache
/
gantry5
/
g5_helium
/
twig
/
69
/
69947d9d3ac6f2f9e4b7845073d2d14983f97394657a66634518227bb71a5e61.php
35
13
__TwigTemplate_4d6a8cb46bcbed74f95923ac535266fc3fdca3bacc32cbd636c1fa2c3bc8f1c3
doDisplay
/
vendor
/
twig
/
twig
/
src
/
Template.php
455
12
Twig
\
Template
displayWithErrorHandling
/
vendor
/
twig
/
twig
/
src
/
Template.php
422
11
Twig
\
Template
display
/
vendor
/
twig
/
twig
/
src
/
Template.php
434
10
Twig
\
Template
render
/
vendor
/
twig
/
twig
/
src
/
TemplateWrapper.php
47
9
Twig
\
TemplateWrapper
render
/
vendor
/
twig
/
twig
/
src
/
Environment.php
384
8
Twig
\
Environment
render
/
classes
/
Gantry
/
Component
/
Theme
/
AbstractTheme.php
163
7
Gantry
\
Component
\
Theme
\
AbstractTheme
render
/
home
/
municace
/
public_html
/
templates
/
g5_helium
/
index.php
23
6
require
/
home
/
municace
/
public_html
/
libraries
/
src
/
Document
/
HtmlDocument.php
658
5
Joomla
\
CMS
\
Document
\
HtmlDocument
_loadTemplate
/
home
/
municace
/
public_html
/
libraries
/
src
/
Document
/
HtmlDocument.php
720
4
Joomla
\
CMS
\
Document
\
HtmlDocument
_fetchTemplate
/
home
/
municace
/
public_html
/
libraries
/
src
/
Document
/
HtmlDocument.php
535
3
Joomla
\
CMS
\
Document
\
HtmlDocument
parse
/
home
/
municace
/
public_html
/
libraries
/
src
/
Application
/
CMSApplication.php
1030
2
Joomla
\
CMS
\
Application
\
CMSApplication
render
/
home
/
municace
/
public_html
/
libraries
/
src
/
Application
/
SiteApplication.php
778
1
Joomla
\
CMS
\
Application
\
SiteApplication
render
/
home
/
municace
/
public_html
/
libraries
/
src
/
Application
/
CMSApplication.php
202
0
Joomla
\
CMS
\
Application
\
CMSApplication
execute
/
home
/
municace
/
public_html
/
index.php
49
{%- do gantry.debugger.startTimer('render', 'Rendering page') %}
{%- do gantry.theme.setLayout() -%}
{%- do gantry.theme.loadAtoms() -%}
{%- set segments = gantry.theme.segments() -%}
 
{%- set content %}
    {% if gantry.theme.hasContent() %}
        {% block content %}
        {% endblock %}
    {% endif %}
{% endset -%}
 
{%- set offcanvas = null -%}
{%- for segment in segments if segment.type == 'offcanvas' %}
    {%- set offcanvas = segment -%}
{% endfor -%}
 
{%- set page_offcanvas %}
    {% block page_offcanvas %}
        {% if offcanvas %}
            {% include '@nucleus/layout/' ~ offcanvas.type ~ '.html.twig' with { 'segment': offcanvas } -%}
        {% endif %}
    {% endblock %}
{% endset -%}
 
{%- set page_offcanvas = page_offcanvas|trim ?: '' %}
{%- set offcanvas_position = page_offcanvas ? offcanvas.attributes.position|default('g-offcanvas-left') : '' -%}
 
{%- set page_layout %}
    {% block page_layout %}
    {% for segment in segments if segment.type != 'offcanvas' %}
        {% include '@nucleus/layout/' ~ segment.type ~ '.html.twig' with { 'segments': segment.children } %}
    {% endfor %}
    {% endblock %}
{% endset -%}
 
{%- set page_top %}
    {% block page_top %}
    {% endblock %}
    {{ gantry.document.getHtml('top')|join("\n    ")|raw }}
                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 $filename
     * @return bool
     */
    public function rename($filename)
    {
        if ($this->exists() && !@rename($this->filename, $filename)) {
            return false;
        }
 
        unset(static::$instances[$this->filename]);
        static::$instances[$filename] = $this;
Exception message: Failed to save file /home/municace/public_html/cache/gantry5/g5_helium/compiled/config/6cb24e8cb55a3ebf9f96d354c0722401.php
{
    /**
     * @var string
     */
    protected $extension = '.php';
 
    /**
     * @var array|File[]
     */
    static protected $instances = [];
 
    /**
     * Saves PHP file and invalidates opcache.
     *
     * @param  mixed  $data  Optional data to be saved, usually array.
     * @throws \RuntimeException
     */
    public function save($data = null)
    {
        parent::save($data);
 
        // Invalidate configuration file from the opcache.
        if (\function_exists('opcache_invalidate')) {
            // PHP 5.5.5+
            @opcache_invalidate($this->filename, true);
        } elseif (\function_exists('apc_invalidate')) {
            // APC
            @apc_invalidate($this->filename);
        }
    }
 
    /**
     * Check contents and make sure it is in correct format.
     *
     * @param array|object $var
     * @return array
     * @throws \RuntimeException
     */
    protected function check($var)
    {
        try {
            $file->lock(false);
        } catch (\Exception $e) {
            // Another process has locked the file; we will check this in a bit.
        }
 
        if ($file->locked() === false) {
            // File was already locked by another process.
            return;
        }
 
        $cache = [
            '@class' => get_class($this),
            'timestamp' => time(),
            'checksum' => $this->checksum(),
            'files' => $this->files,
            'data' => $this->getState()
        ];
 
        $file->save($cache);
        $file->unlock();
        $file->free();
 
        $this->modified();
    }
 
    protected function getState()
    {
        return $this->object->toArray();
    }
}
 
 
    /**
     * Function gets called when cached configuration is saved.
     */
    public function modified() {}
 
    /**
     * Load the configuration.
     *
     * @return mixed
     */
    public function load()
    {
        if ($this->object) {
            return $this->object;
        }
 
        $filename = $this->createFilename();
        if (!$this->loadCompiledFile($filename) && $this->loadFiles()) {
            $this->saveCompiledFile($filename);
        }
 
        return $this->object;
    }
 
    /**
     * Returns checksum from the configuration files.
     *
     * You can set $this->checksum = false to disable this check.
     *
     * @return bool|string
     */
    public function checksum()
    {
        if (!isset($this->checksum)) {
            $this->checksum = md5(json_encode($this->files) . $this->version);
        }
 
        return $this->checksum;
    }
     *
     * @param callable $blueprints
     * @return $this
     */
    public function setBlueprints(callable $blueprints)
    {
        $this->callable = $blueprints;
 
        return $this;
    }
 
    /**
     * @param bool $withDefaults
     * @return mixed
     */
    public function load($withDefaults = false)
    {
        $this->withDefaults = $withDefaults;
 
        return parent::load();
    }
 
    /**
     * Create configuration object.
     *
     * @param  array  $data
     */
    protected function createObject(array $data = [])
    {
        if ($this->withDefaults && empty($data) && is_callable($this->callable)) {
            $blueprints = $this->callable;
            $data = $blueprints()->getDefaults();
        }
 
        $this->object = new Config($data, $this->callable);
    }
 
    /**
     * Finalize configuration object.
     */
        $paths = [];
        foreach ($uris as $uri) {
            $paths = array_merge($paths, $locator->findResources($uri));
        }
 
        // Locate all configuration files to be compiled.
        $files = (new ConfigFileFinder)->locateFiles($paths);
 
        $cache = $locator->findResource('gantry-cache://theme/compiled/config', true, true);
 
        if (!$cache) {
            throw new \RuntimeException('Who just removed Gantry 5 cache folder? Try reloading the page if it fixes the issue');
        }
 
        $compiled = new CompiledConfig($cache, $files, GANTRY5_ROOT);
        $compiled->setBlueprints(function() use ($container) {
            return $container['blueprints'];
        });
 
        $config = $compiled->load($withDefaults);
 
        // Set atom inheritance.
        $atoms = $config->get('page.head.atoms');
        if (is_array($atoms)) {
            $config->set('page.head.atoms', (new Atoms($atoms))->init()->toArray());
        }
 
        return $config;
    }
}
 
 
            $blueprints = static::blueprints($c);
 
            GANTRY_DEBUGGER && \Gantry\Debugger::stopTimer('blueprints');
 
            return $blueprints;
        };
 
        $gantry['config'] = function($c) {
            // Make sure configuration has been set.
            if (!isset($c['configuration'])) {
                throw new \LogicException('Gantry: Please set current configuration before using $gantry["config"]', 500);
            }
 
            GANTRY_DEBUGGER && \Gantry\Debugger::startTimer('config', 'Loading configuration');
 
            // Get the current configuration and lock the value from modification.
            $outline = $c->lock('configuration');
 
            $config = static::load($c, $outline);
 
            GANTRY_DEBUGGER && \Gantry\Debugger::setConfig($config)->stopTimer('config');
 
            return $config;
        };
    }
 
    public static function blueprints(Container $container)
    {
        /** @var UniformResourceLocator $locator */
        $locator = $container['locator'];
 
        $cache = $locator->findResource('gantry-cache://theme/compiled/blueprints', true, true);
 
        $files = [];
        $paths = $locator->findResources('gantry-particles://');
        $files += (new ConfigFileFinder)->setBase('particles')->locateFiles($paths);
        $paths = $locator->findResources('gantry-blueprints://');
        $files += (new ConfigFileFinder)->locateFiles($paths);
 
    {
        if (!isset($this->keys[$id])) {
            throw new UnknownIdentifierException($id);
        }
 
        if (
            isset($this->raw[$id])
            || !\is_object($this->values[$id])
            || isset($this->protected[$this->values[$id]])
            || !\method_exists($this->values[$id], '__invoke')
        ) {
            return $this->values[$id];
        }
 
        if (isset($this->factories[$this->values[$id]])) {
            return $this->values[$id]($this);
        }
 
        $raw = $this->values[$id];
        $val = $this->values[$id] = $raw($this);
        $this->raw[$id] = $raw;
 
        $this->frozen[$id] = true;
 
        return $val;
    }
 
    /**
     * Checks if a parameter or an object is set.
     *
     * @param string $id The unique identifier for the parameter or object
     *
     * @return bool
     */
    public function offsetExists($id)
    {
        return isset($this->keys[$id]);
    }
 
    /**
 
        return !empty($content);
    }
 
    /**
     * Load atoms and assets from the page settings.
     *
     * @since 5.4.9
     */
    public function loadAtoms()
    {
        if (!isset($this->atoms)) {
            $this->atoms = true;
 
            GANTRY_DEBUGGER && \Gantry\Debugger::startTimer('atoms', "Preparing atoms");
 
            $gantry = static::gantry();
 
            /** @var Config $config */
            $config = $gantry['config'];
 
            /** @var \Gantry\Framework\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);
                    }
            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());
            'page_layout' => [$this, 'block_page_layout'],
            'page_top' => [$this, 'block_page_top'],
            'page_bottom' => [$this, 'block_page_bottom'],
            'body_top' => [$this, 'block_body_top'],
            'body_bottom' => [$this, 'block_body_bottom'],
            'page_head' => [$this, 'block_page_head'],
            'page_footer' => [$this, 'block_page_footer'],
            'page' => [$this, 'block_page'],
            'page_body' => [$this, 'block_page_body'],
        ];
    }
 
    protected function doDisplay(array $context, array $blocks = [])
    {
        // line 1
        $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "debugger", []), "startTimer", [0 => "render", 1 => "Rendering page"], "method");
        // line 2
        $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "theme", []), "setLayout", [], "method");
        // line 3
        $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "theme", []), "loadAtoms", [], "method");
        // line 4
        $context["segments"] = $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "theme", []), "segments", [], "method");
        // line 6
        ob_start(function () { return ''; });
        // line 7
        echo "    ";
        if ($this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "theme", []), "hasContent", [], "method")) {
            // line 8
            echo "        ";
            $this->displayBlock('content', $context, $blocks);
            // line 10
            echo "    ";
        }
        $context["content"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset());
        // line 13
        $context["offcanvas"] = null;
        // line 14
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable(($context["segments"] ?? null));
        foreach ($context['_seq'] as $context["_key"] => $context["segment"]) {
            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_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_footer($context, array $blocks = [])
    {
        // line 4
        echo "    ";
        $this->displayParentBlock("page_footer", $context, $blocks);
        echo "
    <jdoc:include type=\"modules\" name=\"debug\" />
";
    }
 
    public function getTemplateName()
    {
        return "partials/page.html.twig";
    }
 
    public function isTraitable()
    {
            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 = [
            'content' => [$this, 'block_content'],
        ];
    }
 
    protected function doGetParent(array $context)
    {
        // line 1
        return "partials/page.html.twig";
    }
 
    protected function doDisplay(array $context, array $blocks = [])
    {
        $this->parent = $this->loadTemplate("partials/page.html.twig", "index.html.twig", 1);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }
 
    // line 3
    public function block_content($context, array $blocks = [])
    {
        // line 4
        echo "    ";
        echo $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "platform", []), "displayContent", [0 => ($context["content"] ?? null)], "method");
        echo "
";
    }
 
    public function getTemplateName()
    {
        return "index.html.twig";
    }
 
    public function isTraitable()
    {
        return false;
            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.
     *
 
            $this->renderer = $this->extendTwig($twig, $loader);
        }
 
        return $this->renderer;
    }
 
    /**
     * Render a template file by using given context.
     *
     * @param string $file
     * @param array $context
     * @return string
     */
    public function render($file, array $context = [])
    {
        // Include Gantry specific things to the context.
        $context = $this->getContext($context);
 
        return $this->renderer()->render($file, $context);
    }
 
    /**
     * Compile and render twig string.
     *
     * @param string $string
     * @param array $context
     * @return string
     */
    public function compile($string, array $context = [])
    {
        $renderer = $this->renderer();
        $template = $renderer->createTemplate($string);
 
        // Include Gantry specific things to the context.
        $context = $this->getContext($context);
 
        return $template->render($context);
    }
 
 * @author    RocketTheme http://www.rockettheme.com
 * @copyright Copyright (C) 2007 - 2017 RocketTheme, LLC
 * @license   GNU/GPLv2 and later
 *
 * http://www.gnu.org/licenses/gpl-2.0.html
 */
 
defined('_JEXEC') or die;
 
// Bootstrap Gantry framework or fail gracefully (inside included file).
$gantry = include __DIR__ . '/includes/gantry.php';
 
/** @var \Gantry\Framework\Theme $theme */
$theme = $gantry['theme'];
 
// All the custom twig variables can be defined in here:
$context = array();
 
// Render the page.
echo $theme->render('index.html.twig', $context);
 
     * @param   string  $directory  The name of the template
     * @param   string  $filename   The actual filename
     *
     * @return  string  The contents of the template
     *
     * @since   1.7.0
     */
    protected function _loadTemplate($directory, $filename)
    {
        $contents = '';
 
        // Check to see if we have a valid template file
        if (file_exists($directory . '/' . $filename))
        {
            // Store the file path
            $this->_file = $directory . '/' . $filename;
 
            // Get the file content
            ob_start();
            require $directory . '/' . $filename;
            $contents = ob_get_contents();
            ob_end_clean();
        }
 
        // Try to find a favicon by checking the template and root folder
        $icon = '/favicon.ico';
 
        foreach (array($directory, JPATH_BASE) as $dir)
        {
            if (file_exists($dir . $icon))
            {
                $path = str_replace(JPATH_BASE, '', $dir);
                $path = str_replace('\\', '/', $path);
                $this->addFavicon(Uri::base(true) . $path . $icon);
                break;
            }
        }
 
        return $contents;
    }
 
        if (!file_exists($directory . '/' . $template . '/' . $file))
        {
            $file = 'index.php';
        }
 
        // Load the language file for the template
        $lang = \JFactory::getLanguage();
 
        // 1.5 or core then 1.6
        $lang->load('tpl_' . $template, JPATH_BASE, null, false, true)
            || $lang->load('tpl_' . $template, $directory . '/' . $template, null, false, true);
 
        // Assign the variables
        $this->template = $template;
        $this->baseurl = Uri::base(true);
        $this->params = isset($params['params']) ? $params['params'] : new Registry;
 
        // Load
        $this->_template = $this->_loadTemplate($directory . '/' . $template, $file);
 
        return $this;
    }
 
    /**
     * Parse a document template
     *
     * @return  HtmlDocument  instance of $this to allow chaining
     *
     * @since   1.7.0
     */
    protected function _parseTemplate()
    {
        $matches = array();
 
        if (preg_match_all('#<jdoc:include\ type="([^"]+)"(.*)\/>#iU', $this->_template, $matches))
        {
            $template_tags_first = array();
            $template_tags_last = array();
 
            $options['title'] = (isset($args[3])) ? $args[3] : null;
        }
 
        parent::$_buffer[$options['type']][$options['name']][$options['title']] = $content;
 
        return $this;
    }
 
    /**
     * Parses the template and populates the buffer
     *
     * @param   array  $params  Parameters for fetching the template
     *
     * @return  HtmlDocument instance of $this to allow chaining
     *
     * @since   1.7.0
     */
    public function parse($params = array())
    {
        return $this->_fetchTemplate($params)->_parseTemplate();
    }
 
    /**
     * Outputs the template to the browser.
     *
     * @param   boolean  $caching  If true, cache the output
     * @param   array    $params   Associative array of attributes
     *
     * @return  string The rendered data
     *
     * @since   1.7.0
     */
    public function render($caching = false, $params = array())
    {
        $this->_caching = $caching;
 
        if (empty($this->_template))
        {
            $this->parse($params);
        }
     */
    protected function render()
    {
        // Setup the document options.
        $this->docOptions['template'] = $this->get('theme');
        $this->docOptions['file']     = $this->get('themeFile', 'index.php');
        $this->docOptions['params']   = $this->get('themeParams');
 
        if ($this->get('themes.base'))
        {
            $this->docOptions['directory'] = $this->get('themes.base');
        }
        // Fall back to constants.
        else
        {
            $this->docOptions['directory'] = defined('JPATH_THEMES') ? JPATH_THEMES : (defined('JPATH_BASE') ? JPATH_BASE : __DIR__) . '/themes';
        }
 
        // Parse the document.
        $this->document->parse($this->docOptions);
 
        // Trigger the onBeforeRender event.
        \JPluginHelper::importPlugin('system');
        $this->triggerEvent('onBeforeRender');
 
        $caching = false;
 
        if ($this->isClient('site') && $this->get('caching') && $this->get('caching', 2) == 2 && !\JFactory::getUser()->get('id'))
        {
            $caching = true;
        }
 
        // Render the document.
        $data = $this->document->render($caching, $this->docOptions);
 
        // Set the application output data.
        $this->setBody($data);
 
        // Trigger the onAfterRender event.
        $this->triggerEvent('onAfterRender');
                    $this->setUserState('users.login.form.data', array('return' => \JUri::getInstance()->toString()));
                    $this->set('themeFile', 'offline.php');
                    $this->setHeader('Status', '503 Service Temporarily Unavailable', 'true');
                }
 
                if (!is_dir(JPATH_THEMES . '/' . $template->template) && !$this->get('offline'))
                {
                    $this->set('themeFile', 'component.php');
                }
 
                // Ensure themeFile is set by now
                if ($this->get('themeFile') == '')
                {
                    $this->set('themeFile', $file . '.php');
                }
 
                break;
        }
 
        parent::render();
    }
 
    /**
     * Route the application.
     *
     * Routing is the process of examining the request environment to determine which
     * component should receive the request. The component optional parameters
     * are then set in the request object to be processed when the application is being
     * dispatched.
     *
     * @return  void
     *
     * @since   3.2
     */
    protected function route()
    {
        // Execute the parent method
        parent::route();
 
        $Itemid = $this->input->getInt('Itemid', null);
        }
    }
 
    /**
     * Execute the application.
     *
     * @return  void
     *
     * @since   3.2
     */
    public function execute()
    {
        // Perform application routines.
        $this->doExecute();
 
        // If we have an application document object, render it.
        if ($this->document instanceof \JDocument)
        {
            // Render the application output.
            $this->render();
        }
 
        // If gzip compression is enabled in configuration and the server is compliant, compress the output.
        if ($this->get('gzip') && !ini_get('zlib.output_compression') && ini_get('output_handler') !== 'ob_gzhandler')
        {
            $this->compress();
 
            // Trigger the onAfterCompress event.
            $this->triggerEvent('onAfterCompress');
        }
 
        // Send the application response.
        $this->respond();
 
        // Trigger the onAfterRespond event.
        $this->triggerEvent('onAfterRespond');
    }
 
    /**
     * Check if the user is required to reset their password.
{
    include_once __DIR__ . '/defines.php';
}
 
if (!defined('_JDEFINES'))
{
    define('JPATH_BASE', __DIR__);
    require_once JPATH_BASE . '/includes/defines.php';
}
 
require_once JPATH_BASE . '/includes/framework.php';
 
// Set profiler start time and memory usage and mark afterLoad in the profiler.
JDEBUG ? JProfiler::getInstance('Application')->setStart($startTime, $startMem)->mark('afterLoad') : null;
 
// Instantiate the application.
$app = JFactory::getApplication('site');
 
// Execute the application.
$app->execute();
 

Environment & details:

empty
empty
empty
empty
empty
Key Value
USER municace
HOME /home/municace
PATH_TRANSLATED /home/municace/public_html/servicios/vaso-de-leche
PATH_INFO /servicios/vaso-de-leche
SCRIPT_NAME /index.php
REQUEST_URI /index.php/servicios/vaso-de-leche
QUERY_STRING
REQUEST_METHOD GET
SERVER_PROTOCOL HTTP/1.1
GATEWAY_INTERFACE CGI/1.1
REMOTE_PORT 37646
SCRIPT_FILENAME /home/municace/public_html/index.php
SERVER_ADMIN webmaster@municaceresdelperu.gob.pe
CONTEXT_DOCUMENT_ROOT /home/municace/public_html
CONTEXT_PREFIX
REQUEST_SCHEME https
DOCUMENT_ROOT /home/municace/public_html
REMOTE_ADDR 3.209.80.87
SERVER_PORT 443
SERVER_ADDR 78.46.81.88
SERVER_NAME municaceresdelperu.gob.pe
SERVER_SOFTWARE Apache
SERVER_SIGNATURE
PATH /usr/local/jdk/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/X11R6/bin:/root/bin:/opt/bin
HTTP_X_HTTPS 1
HTTP_ACCEPT_ENCODING gzip
HTTP_CONNECTION Keep-Alive
HTTP_HOST municaceresdelperu.gob.pe
HTTP_ACCEPT_LANGUAGE en-US,en;q=0.5
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_USER_AGENT CCBot/2.0 (https://commoncrawl.org/faq/)
proxy-nokeepalive 1
SSL_TLS_SNI municaceresdelperu.gob.pe
HTTPS on
SCRIPT_URI https://municaceresdelperu.gob.pe/index.php/servicios/vaso-de-leche
SCRIPT_URL /index.php/servicios/vaso-de-leche
UNIQUE_ID Xa-lY6NppOypcP6jxUpFrgAAAAc
FCGI_ROLE RESPONDER
PHP_SELF /index.php/servicios/vaso-de-leche
REQUEST_TIME_FLOAT 1571808611.2165
REQUEST_TIME 1571808611
argv Array ( )
argc 0
empty
0. Whoops\Handler\PrettyPageHandler