18. Twig_Error_Runtime
…/­vendor/­twig/­twig/­lib/­Twig/­Template.php380
17. Whoops\Exception\ErrorException
…/­vendor/­twig/­twig/­lib/­Twig/­Extension/­Core.php1286
16. Whoops\Run handleError
…/­vendor/­twig/­twig/­lib/­Twig/­Extension/­Core.php1286
15. twig_length_filter
…/­cache/­twig/­9/­6/­96a5ca2231939f02c48559513a40d14c9554912ed0f896e7e8bcdffd28dc8739.php40
14. __TwigTemplate_ac20d52bb91a7f02031b06c94efb704095403715013f2a7a9eb48edf40e70edb doDisplay
…/­vendor/­twig/­twig/­lib/­Twig/­Template.php365
13. Twig_Template displayWithErrorHandling
…/­vendor/­twig/­twig/­lib/­Twig/­Template.php339
12. Twig_Template display
…/­cache/­twig/­a/­5/­a59281ac27c222965835bda98ec12b89ef05502975e5ac7d89f249fc5e5b2d3a.php42
11. __TwigTemplate_7ba878c9b974243ea32fdb7e4f98202b25d82c0e8e3e61cee791766370fe245d doDisplay
…/­vendor/­twig/­twig/­lib/­Twig/­Template.php365
10. Twig_Template displayWithErrorHandling
…/­vendor/­twig/­twig/­lib/­Twig/­Template.php339
9. Twig_Template display
…/­cache/­twig/­c/­c/­cc58f260f63ec72ee0e59b4214402819582cd505f39492a071cd0c9a59c76cf0.php27
8. __TwigTemplate_b071940d14c8104cfef57624d3bedaac73939780f7da12f1054416728f0f818a doDisplay
…/­vendor/­twig/­twig/­lib/­Twig/­Template.php365
7. Twig_Template displayWithErrorHandling
…/­vendor/­twig/­twig/­lib/­Twig/­Template.php339
6. Twig_Template display
…/­vendor/­twig/­twig/­lib/­Twig/­Template.php350
5. Twig_Template render
…/­vendor/­twig/­twig/­lib/­Twig/­Environment.php334
4. Twig_Environment render
…/­system/­src/­Grav/­Common/­Twig/­Twig.php323
3. Grav\Common\Twig\Twig processSite
…/­system/­src/­Grav/­Common/­Grav.php143
2. Grav\Common\Grav Grav\Common\{closure}
…/­vendor/­pimple/­pimple/­src/­Pimple/­Container.php113
1. Pimple\Container offsetGet
…/­system/­src/­Grav/­Common/­Grav.php238
0. Grav\Common\Grav process
…/­index.php37

Twig_Error_Runtime

Callstack information; navigate with mouse or keyboard using Ctrl+↑ or Ctrl+↓
Copy-to-clipboard button
Exception message and its type
Code snippet where the error was thrown
Server state information
Application provided context information
Twig_Error_Runtime thrown with message "An exception has been thrown during the rendering of a template ("count(): Parameter must be an array or an object that implements Countable") in "partials/sidebar.html.twig" at line 12." Stacktrace: #18 Twig_Error_Runtime in /home/moss2uganda/public_html/vendor/twig/twig/lib/Twig/Template.php:380 #17 Whoops\Exception\ErrorException in /home/moss2uganda/public_html/vendor/twig/twig/lib/Twig/Extension/Core.php:1286 #16 Whoops\Run:handleError in /home/moss2uganda/public_html/vendor/twig/twig/lib/Twig/Extension/Core.php:1286 #15 twig_length_filter in /home/moss2uganda/public_html/cache/twig/9/6/96a5ca2231939f02c48559513a40d14c9554912ed0f896e7e8bcdffd28dc8739.php:40 #14 __TwigTemplate_ac20d52bb91a7f02031b06c94efb704095403715013f2a7a9eb48edf40e70edb:doDisplay in /home/moss2uganda/public_html/vendor/twig/twig/lib/Twig/Template.php:365 #13 Twig_Template:displayWithErrorHandling in /home/moss2uganda/public_html/vendor/twig/twig/lib/Twig/Template.php:339 #12 Twig_Template:display in /home/moss2uganda/public_html/cache/twig/a/5/a59281ac27c222965835bda98ec12b89ef05502975e5ac7d89f249fc5e5b2d3a.php:42 #11 __TwigTemplate_7ba878c9b974243ea32fdb7e4f98202b25d82c0e8e3e61cee791766370fe245d:doDisplay in /home/moss2uganda/public_html/vendor/twig/twig/lib/Twig/Template.php:365 #10 Twig_Template:displayWithErrorHandling in /home/moss2uganda/public_html/vendor/twig/twig/lib/Twig/Template.php:339 #9 Twig_Template:display in /home/moss2uganda/public_html/cache/twig/c/c/cc58f260f63ec72ee0e59b4214402819582cd505f39492a071cd0c9a59c76cf0.php:27 #8 __TwigTemplate_b071940d14c8104cfef57624d3bedaac73939780f7da12f1054416728f0f818a:doDisplay in /home/moss2uganda/public_html/vendor/twig/twig/lib/Twig/Template.php:365 #7 Twig_Template:displayWithErrorHandling in /home/moss2uganda/public_html/vendor/twig/twig/lib/Twig/Template.php:339 #6 Twig_Template:display in /home/moss2uganda/public_html/vendor/twig/twig/lib/Twig/Template.php:350 #5 Twig_Template:render in /home/moss2uganda/public_html/vendor/twig/twig/lib/Twig/Environment.php:334 #4 Twig_Environment:render in /home/moss2uganda/public_html/system/src/Grav/Common/Twig/Twig.php:323 #3 Grav\Common\Twig\Twig:processSite in /home/moss2uganda/public_html/system/src/Grav/Common/Grav.php:143 #2 Grav\Common\Grav:Grav\Common\{closure} in /home/moss2uganda/public_html/vendor/pimple/pimple/src/Pimple/Container.php:113 #1 Pimple\Container:offsetGet in /home/moss2uganda/public_html/system/src/Grav/Common/Grav.php:238 #0 Grav\Common\Grav:process in /home/moss2uganda/public_html/index.php:37

An exception has been thrown during the rendering of a template ("count(): Parameter must be an array or an object that implements Countable") in "partials/sidebar.html.twig" at line 12.

            if (false === $e->getTemplateLine()) {
                $e->setTemplateLine(-1);
                $e->guess();
            }
 
            throw $e;
        } catch (Exception $e) {
            throw new Twig_Error_Runtime(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getTemplateName(), $e);
        }
    }
     * @param Twig_Environment $env   A Twig_Environment instance
     * @param mixed            $thing A variable
     *
     * @return int The length of the value
     */
    function twig_length_filter(Twig_Environment $env, $thing)
    {
        return is_scalar($thing) ? mb_strlen($thing, $env->getCharset()) : count($thing);
    }
 
Exception message: count(): Parameter must be an array or an object that implements Countable
     * @param Twig_Environment $env   A Twig_Environment instance
     * @param mixed            $thing A variable
     *
     * @return int The length of the value
     */
    function twig_length_filter(Twig_Environment $env, $thing)
    {
        return is_scalar($thing) ? mb_strlen($thing, $env->getCharset()) : count($thing);
    }
 
            $this->loadTemplate("partials/simplesearch_searchbox.html.twig", "partials/sidebar.html.twig", 8)->display($context);
            echo "                    
\t</div>
</div>
";
        }
        // line 12
        if (($this->getAttribute($this->getAttribute($this->getAttribute((isset($context["config"]) ? $context["config"] : null), "plugins", array()), "relatedpages", array()), "enabled", array()) && (twig_length_filter($this->env, (isset($context["related_pages"]) ? $context["related_pages"] : null)) > 0))) {
            // line 13
            echo "<div class=\"jb-view\" style=\"width:100%\">
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = array())
    {
        try {
            $this->doDisplay($context, $blocks);
        } catch (Twig_Error $e) {
            if (!$e->getTemplateFile()) {
    }
 
    /**
     * {@inheritdoc}
     */
    public function display(array $context, array $blocks = array())
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
        $this->loadTemplate("partials/header.html.twig", "partials/base.html.twig", 37)->display($context);
        // line 38
        echo "    <div class=\"jb-main-view\">
        <!--
        <div class=\"jb-sidebar\">
            ";
        // line 41
        $this->loadTemplate("partials/sidebar.html.twig", "partials/base.html.twig", 41)->display($context);
        // line 42
        echo "        </div>
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = array())
    {
        try {
            $this->doDisplay($context, $blocks);
        } catch (Twig_Error $e) {
            if (!$e->getTemplateFile()) {
    }
 
    /**
     * {@inheritdoc}
     */
    public function display(array $context, array $blocks = array())
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    }
 
    protected function doDisplay(array $context, array $blocks = array())
    {
        // line 3
        $context["collection"] = $this->getAttribute((isset($context["page"]) ? $context["page"] : null), "collection", array(), "method");
        // line 1
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }
 
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = array())
    {
        try {
            $this->doDisplay($context, $blocks);
        } catch (Twig_Error $e) {
            if (!$e->getTemplateFile()) {
    }
 
    /**
     * {@inheritdoc}
     */
    public function display(array $context, array $blocks = array())
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
     * {@inheritdoc}
     */
    public function render(array $context)
    {
        $level = ob_get_level();
        ob_start();
        try {
            $this->display($context);
        } catch (Exception $e) {
            while (ob_get_level() > $level) {
     *
     * @throws Twig_Error_Loader  When the template cannot be found
     * @throws Twig_Error_Syntax  When an error occurred during compilation
     * @throws Twig_Error_Runtime When an error occurred during rendering
     */
    public function render($name, array $context = array())
    {
        return $this->loadTemplate($name)->render($context);
    }
 
            $this->twig->setCache(false);
        }
 
        // Get Twig template layout
        $template = $this->template($page->template() . $ext);
 
        try {
            $output = $this->twig->render($template, $twig_vars);
        } catch (\Twig_Error_Loader $e) {
            // If loader error, and not .html.twig, try it as fallback
                } else {
                    throw new \RuntimeException('Page Not Found', 404);
                }
            }
            return $page;
        };
        $container['output'] = function ($c) {
            return $c['twig']->processSite($c['uri']->extension());
        };
        $container['browser'] = function ($c) {
        }
 
        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;
 
        $debugger->stopTimer('pages');
        $this->fireEvent('onPageInitialized');
 
        $debugger->addAssets();
 
        // Process whole page as required
        $debugger->startTimer('render', 'Render');
        $this->output = $this['output'];
        $this->fireEvent('onOutputGenerated');
        $debugger->stopTimer('render');
    array(
        'loader' => $loader
    )
);
 
// Process the page
try {
    $grav->process();
} catch (\Exception $e) {
    $grav->fireEvent('onFatalException');
empty
empty
empty
empty
empty
Key Value
CONTEXT_DOCUMENT_ROOT /home/moss2uganda/public_html
CONTEXT_PREFIX
DOCUMENT_ROOT /home/moss2uganda/public_html
GATEWAY_INTERFACE CGI/1.1
HTTP_ACCEPT */*
HTTP_HOST moss2uganda.com
HTTP_USER_AGENT claudebot
PATH /bin:/usr/bin
QUERY_STRING
REDIRECT_SCRIPT_URI http://moss2uganda.com/updates
REDIRECT_SCRIPT_URL /updates
REDIRECT_STATUS 200
REDIRECT_UNIQUE_ID ZgWQoL3BEu1B8AhCfwWcQAAAAxg
REDIRECT_URL /updates
REMOTE_ADDR 54.205.238.173
REMOTE_PORT 49146
REQUEST_METHOD GET
REQUEST_SCHEME http
REQUEST_URI /updates
SCRIPT_FILENAME /home/moss2uganda/public_html/index.php
SCRIPT_NAME /index.php
SCRIPT_URI http://moss2uganda.com/updates
SCRIPT_URL /updates
SERVER_ADDR 74.124.203.238
SERVER_ADMIN webmaster@moss2uganda.com
SERVER_NAME moss2uganda.com
SERVER_PORT 80
SERVER_PROTOCOL HTTP/1.1
SERVER_SIGNATURE
SERVER_SOFTWARE Apache
TZ America/Los_Angeles
UNIQUE_ID ZgWQoL3BEu1B8AhCfwWcQAAAAxg
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711640736.75
REQUEST_TIME 1711640736
argv Array ( )
argc 0
Key Value
CONTEXT_DOCUMENT_ROOT /home/moss2uganda/public_html
CONTEXT_PREFIX
DOCUMENT_ROOT /home/moss2uganda/public_html
GATEWAY_INTERFACE CGI/1.1
HTTP_ACCEPT */*
HTTP_HOST moss2uganda.com
HTTP_USER_AGENT claudebot
PATH /bin:/usr/bin
QUERY_STRING
REDIRECT_SCRIPT_URI http://moss2uganda.com/updates
REDIRECT_SCRIPT_URL /updates
REDIRECT_STATUS 200
REDIRECT_UNIQUE_ID ZgWQoL3BEu1B8AhCfwWcQAAAAxg
REDIRECT_URL /updates
REMOTE_ADDR 54.205.238.173
REMOTE_PORT 49146
REQUEST_METHOD GET
REQUEST_SCHEME http
REQUEST_URI /updates
SCRIPT_FILENAME /home/moss2uganda/public_html/index.php
SCRIPT_NAME /index.php
SCRIPT_URI http://moss2uganda.com/updates
SCRIPT_URL /updates
SERVER_ADDR 74.124.203.238
SERVER_ADMIN webmaster@moss2uganda.com
SERVER_NAME moss2uganda.com
SERVER_PORT 80
SERVER_PROTOCOL HTTP/1.1
SERVER_SIGNATURE
SERVER_SOFTWARE Apache
TZ America/Los_Angeles
UNIQUE_ID ZgWQoL3BEu1B8AhCfwWcQAAAAxg
pretty. Whoops\Handler\PrettyPageHandler
text. Whoops\Handler\PlainTextHandler
json. Whoops\Handler\JsonResponseHandler
log. Whoops\Handler\CallbackHandler