Twig_Error_Syntax
Unexpected character "\". Twig_Error_Syntax thrown with message "Unexpected character "\"." Stacktrace: #14 Twig_Error_Syntax in /home/stanmann/public_html/wp-content/themes/g5_helium/views/index.html.twig:1 #13 Twig_Lexer:lexExpression in /home/stanmann/public_html/wp-content/plugins/gantry5/src/vendor/twig/twig/lib/Twig/Lexer.php:216 #12 Twig_Lexer:lexBlock in /home/stanmann/public_html/wp-content/plugins/gantry5/src/vendor/twig/twig/lib/Twig/Lexer.php:122 #11 Twig_Lexer:tokenize in /home/stanmann/public_html/wp-content/plugins/gantry5/src/vendor/twig/twig/lib/Twig/Environment.php:653 #10 Twig_Environment:tokenize in /home/stanmann/public_html/wp-content/plugins/gantry5/src/vendor/twig/twig/lib/Twig/Environment.php:750 #9 Twig_Environment:compileSource in /home/stanmann/public_html/wp-content/plugins/gantry5/src/vendor/twig/twig/lib/Twig/Environment.php:447 #8 Twig_Environment:loadTemplate in /home/stanmann/public_html/wp-content/plugins/gantry5/src/vendor/twig/twig/lib/Twig/Environment.php:362 #7 Twig_Environment:render in /home/stanmann/public_html/wp-content/plugins/timber-library/lib/Loader.php:74 #6 Timber\Loader:render in /home/stanmann/public_html/wp-content/plugins/timber-library/lib/Timber.php:318 #5 Timber\Timber:compile in /home/stanmann/public_html/wp-content/plugins/timber-library/lib/Timber.php:362 #4 Timber\Timber:fetch in /home/stanmann/public_html/wp-content/plugins/timber-library/lib/Timber.php:389 #3 Timber\Timber:render in /home/stanmann/public_html/wp-content/themes/g5_helium/index.php:69 #2 include in /home/stanmann/public_html/wp-includes/template-loader.php:74 #1 require_once in /home/stanmann/public_html/wp-blog-header.php:19 #0 require in /home/stanmann/public_html/index.php:17
Stack frames (15)
14
Twig_Error_Syntax
/
home
/
stanmann
/
public_html
/
wp-content
/
themes
/
g5_helium
/
views
/
index.html.twig
1
13
Twig_Lexer
lexExpression
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Lexer.php
216
12
Twig_Lexer
lexBlock
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Lexer.php
122
11
Twig_Lexer
tokenize
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Environment.php
653
10
Twig_Environment
tokenize
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Environment.php
750
9
Twig_Environment
compileSource
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Environment.php
447
8
Twig_Environment
loadTemplate
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Environment.php
362
7
Twig_Environment
render
/
home
/
stanmann
/
public_html
/
wp-content
/
plugins
/
timber-library
/
lib
/
Loader.php
74
6
Timber
\
Loader
render
/
home
/
stanmann
/
public_html
/
wp-content
/
plugins
/
timber-library
/
lib
/
Timber.php
318
5
Timber
\
Timber
compile
/
home
/
stanmann
/
public_html
/
wp-content
/
plugins
/
timber-library
/
lib
/
Timber.php
362
4
Timber
\
Timber
fetch
/
home
/
stanmann
/
public_html
/
wp-content
/
plugins
/
timber-library
/
lib
/
Timber.php
389
3
Timber
\
Timber
render
/
home
/
stanmann
/
public_html
/
wp-content
/
themes
/
g5_helium
/
index.php
69
2
include
/
home
/
stanmann
/
public_html
/
wp-includes
/
template-loader.php
74
1
require_once
/
home
/
stanmann
/
public_html
/
wp-blog-header.php
19
0
require
/
home
/
stanmann
/
public_html
/
index.php
17
{% extends \\\"partials/page.html.twig\\\" %}
{% set twigTemplate = \\\'index.html.twig\\\' %}
{% set scope = \\\'blog\\\' %}
 
{% block content %}
 
    <div class=\\\"platform-content\\\">
        <div class=\\\"blog\\\">
 
            {# Begin Page Header #}
            {% if gantry.config.get(\\\'content.\\\' ~ scope ~ \\\'.heading.enabled\\\', \\\'0\\\') and gantry.config.get(\\\'content.\\\' ~ scope ~ \\\'.heading.text\\\') is not empty %}
                <header class=\\\"page-header\\\">
                    <h1>
                        {{ gantry.config.get(\\\'content.\\\' ~ scope ~ \\\'.heading.text\\\') }}
                    </h1>
                </header>
            {% endif %}
            {# End Page Header #}
 
            {# Begin Post Entries #}
            <section class=\\\"entries\\\">
                {% for post in posts %}
                    {% include [\\\'partials/content-\\\' ~ scope ~ \\\'.html.twig\\\', (post.format) ? \\\'partials/content-\\\' ~ post.format ~ \\\'.html.twig\\\' : \\\'\\\', \\\'partials/content.html.twig\\\'] %}
                {% endfor %}
            </section>
            {# End Post Entries #}
 
            {# Begin Pagination #}
            {% if pagination.pages and pagination.pages|length > 1 %}
                {% include \\\'partials/pagination.html.twig\\\' %}
            {% endif %}
            {# End Pagination #}
 
        </div>
    </div>
 
{% endblock %}
                    $this->currentVarBlockLine = $this->lineno;
                }
                break;
 
            case $this->options['tag_variable'][0]:
                $this->pushToken(Twig_Token::VAR_START_TYPE);
                $this->pushState(self::STATE_VAR);
                $this->currentVarBlockLine = $this->lineno;
                break;
        }
    }
 
    protected function lexBlock()
    {
        if (empty($this->brackets) && preg_match($this->regexes['lex_block'], $this->code, $match, null, $this->cursor)) {
            $this->pushToken(Twig_Token::BLOCK_END_TYPE);
            $this->moveCursor($match[0]);
            $this->popState();
        } else {
            $this->lexExpression();
        }
    }
 
    protected function lexVar()
    {
        if (empty($this->brackets) && preg_match($this->regexes['lex_var'], $this->code, $match, null, $this->cursor)) {
            $this->pushToken(Twig_Token::VAR_END_TYPE);
            $this->moveCursor($match[0]);
            $this->popState();
        } else {
            $this->lexExpression();
        }
    }
 
    protected function lexExpression()
    {
        // whitespace
        if (preg_match('/\s+/A', $this->code, $match, null, $this->cursor)) {
            $this->moveCursor($match[0]);
 
        $this->tokens = array();
        $this->state = self::STATE_DATA;
        $this->states = array();
        $this->brackets = array();
        $this->position = -1;
 
        // find all token starts in one go
        preg_match_all($this->regexes['lex_tokens_start'], $this->code, $matches, PREG_OFFSET_CAPTURE);
        $this->positions = $matches;
 
        while ($this->cursor < $this->end) {
            // dispatch to the lexing functions depending
            // on the current state
            switch ($this->state) {
                case self::STATE_DATA:
                    $this->lexData();
                    break;
 
                case self::STATE_BLOCK:
                    $this->lexBlock();
                    break;
 
                case self::STATE_VAR:
                    $this->lexVar();
                    break;
 
                case self::STATE_STRING:
                    $this->lexString();
                    break;
 
                case self::STATE_INTERPOLATION:
                    $this->lexInterpolation();
                    break;
            }
        }
 
        $this->pushToken(Twig_Token::EOF_TYPE);
 
        if (!empty($this->brackets)) {
            list($expect, $lineno) = array_pop($this->brackets);
     *
     * @param string|Twig_Source $source The template source code
     * @param string             $name   The template name (deprecated)
     *
     * @return Twig_TokenStream
     *
     * @throws Twig_Error_Syntax When the code is syntactically wrong
     */
    public function tokenize($source, $name = null)
    {
        if (!$source instanceof Twig_Source) {
            @trigger_error(sprintf('Passing a string as the $source argument of %s() is deprecated since version 1.27. Pass a Twig_Source instance instead.', __METHOD__), E_USER_DEPRECATED);
            $source = new Twig_Source($source, $name);
        }
 
        if (null === $this->lexer) {
            $this->lexer = new Twig_Lexer($this);
        }
 
        return $this->lexer->tokenize($source);
    }
 
    /**
     * Gets the Parser instance.
     *
     * @return Twig_ParserInterface
     *
     * @deprecated since 1.25 (to be removed in 2.0)
     */
    public function getParser()
    {
        @trigger_error(sprintf('The %s() method is deprecated since version 1.25 and will be removed in 2.0.', __FUNCTION__), E_USER_DEPRECATED);
 
        if (null === $this->parser) {
            $this->parser = new Twig_Parser($this);
        }
 
        return $this->parser;
    }
 
 
    /**
     * Compiles a template source code.
     *
     * @param string|Twig_Source $source The template source code
     * @param string             $name   The template name (deprecated)
     *
     * @return string The compiled PHP source code
     *
     * @throws Twig_Error_Syntax When there was an error during tokenizing, parsing or compiling
     */
    public function compileSource($source, $name = null)
    {
        if (!$source instanceof Twig_Source) {
            @trigger_error(sprintf('Passing a string as the $source argument of %s() is deprecated since version 1.27. Pass a Twig_Source instance instead.', __METHOD__), E_USER_DEPRECATED);
            $source = new Twig_Source($source, $name);
        }
 
        try {
            return $this->compile($this->parse($this->tokenize($source)));
        } catch (Twig_Error $e) {
            $e->setSourceContext($source);
            throw $e;
        } catch (Exception $e) {
            throw new Twig_Error_Syntax(sprintf('An exception has been thrown during the compilation of a template ("%s").', $e->getMessage()), -1, $source, $e);
        }
    }
 
    public function setLoader(Twig_LoaderInterface $loader)
    {
        if (!$loader instanceof Twig_SourceContextLoaderInterface && 0 !== strpos(get_class($loader), 'Mock_')) {
            @trigger_error(sprintf('Twig loader "%s" should implement Twig_SourceContextLoaderInterface since version 1.27.', get_class($loader)), E_USER_DEPRECATED);
        }
 
        $this->loader = $loader;
    }
 
    /**
     * Gets the Loader instance.
     *
        if (!class_exists($cls, false)) {
            if ($this->bcGetCacheFilename) {
                $key = $this->getCacheFilename($name);
            } else {
                $key = $this->cache->generateKey($name, $mainCls);
            }
 
            if (!$this->isAutoReload() || $this->isTemplateFresh($name, $this->cache->getTimestamp($key))) {
                $this->cache->load($key);
            }
 
            if (!class_exists($cls, false)) {
                $loader = $this->getLoader();
                if (!$loader instanceof Twig_SourceContextLoaderInterface) {
                    $source = new Twig_Source($loader->getSource($name), $name);
                } else {
                    $source = $loader->getSourceContext($name);
                }
 
                $content = $this->compileSource($source);
 
                if ($this->bcWriteCacheFile) {
                    $this->writeCacheFile($key, $content);
                } else {
                    $this->cache->write($key, $content);
                    $this->cache->load($key);
                }
 
                if (!class_exists($mainCls, false)) {
                    /* Last line of defense if either $this->bcWriteCacheFile was used,
                     * $this->cache is implemented as a no-op or we have a race condition
                     * where the cache was cleared between the above calls to write to and load from
                     * the cache.
                     */
                    eval('?>'.$content);
                }
            }
 
            if (!class_exists($cls, false)) {
                throw new Twig_Error_Runtime(sprintf('Failed to load Twig template "%s", index "%s": cache is corrupted.', $name, $index), -1, $source);
        @trigger_error(sprintf('The %s method is deprecated since version 1.22 and will be removed in Twig 2.0.', __METHOD__), E_USER_DEPRECATED);
 
        return $this->templateClassPrefix;
    }
 
    /**
     * Renders a template.
     *
     * @param string $name    The template name
     * @param array  $context An array of parameters to pass to the template
     *
     * @return string The rendered template
     *
     * @throws Twig_Error_Loader  When the template cannot be found
     * @throws Twig_Error_Syntax  When an error occurred during compilation
     * @throws Twig_Error_Runtime When an error occurred during rendering
     */
    public function render($name, array $context = array())
    {
        return $this->loadTemplate($name)->render($context);
    }
 
    /**
     * Displays a template.
     *
     * @param string $name    The template name
     * @param array  $context An array of parameters to pass to the template
     *
     * @throws Twig_Error_Loader  When the template cannot be found
     * @throws Twig_Error_Syntax  When an error occurred during compilation
     * @throws Twig_Error_Runtime When an error occurred during rendering
     */
    public function display($name, array $context = array())
    {
        $this->loadTemplate($name)->display($context);
    }
 
    /**
     * Loads a template.
     *
        }
 
        $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);
            $output = $twig->render($file, $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);
        }
 
        do_action('timber_compile_done');
        return $output;
    }
 
    /**
     * Compile a string.
     *
     * @api
     * @example
     * ```php
     * $data = array(
     *     'username' => 'Jane Doe',
     * );
     *
     * $welcome = Timber::compile_string( 'Hi {{ username }}, I’m a string with a custom Twig variable', $data );
     * ```
     * @param string $string A string with Twig variables.
     * @param array  $data   Optional. An array of data to use in Twig template.
        $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::get_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::get_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);
 
    elseif ( is_single()         && $template = get_single_template()         ) :
    elseif ( is_page()           && $template = get_page_template()           ) :
    elseif ( is_singular()       && $template = get_singular_template()       ) :
    elseif ( is_category()       && $template = get_category_template()       ) :
    elseif ( is_tag()            && $template = get_tag_template()            ) :
    elseif ( is_author()         && $template = get_author_template()         ) :
    elseif ( is_date()           && $template = get_date_template()           ) :
    elseif ( is_archive()        && $template = get_archive_template()        ) :
    else :
        $template = get_index_template();
    endif;
    /**
     * Filters the path of the current template before including it.
     *
     * @since 3.0.0
     *
     * @param string $template The path of the template to include.
     */
    if ( $template = apply_filters( 'template_include', $template ) ) {
        include( $template );
    } elseif ( current_user_can( 'switch_themes' ) ) {
        $theme = wp_get_theme();
        if ( $theme->errors() ) {
            wp_die( $theme->errors() );
        }
    }
    return;
endif;
 
<?php
/**
 * Loads the WordPress environment and template.
 *
 * @package WordPress
 */
 
if ( !isset($wp_did_header) ) {
 
    $wp_did_header = true;
 
    // Load the WordPress library.
    require_once( dirname(__FILE__) . '/wp-load.php' );
 
    // Set up the WordPress query.
    wp();
 
    // Load the theme template.
    require_once( ABSPATH . WPINC . '/template-loader.php' );
 
}
 
<?php
/**
 * Front to the WordPress application. This file doesn't do anything, but loads
 * wp-blog-header.php which does and tells WordPress to load the theme.
 *
 * @package WordPress
 */
 
/**
 * Tells WordPress to load the WordPress theme and output it.
 *
 * @var bool
 */
define('WP_USE_THEMES', true);
 
/** Loads the WordPress Environment and Template */
require( dirname( __FILE__ ) . '/wp-blog-header.php' );
 

Environment & details:

empty
empty
empty
empty
empty
Key Value
SERVER_SOFTWARE Apache
REQUEST_URI /blog/
CONTEXT_DOCUMENT_ROOT /home/stanmann/public_html
CONTEXT_PREFIX
DOCUMENT_ROOT /home/stanmann/public_html
GATEWAY_INTERFACE CGI/1.1
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_ACCEPT_ENCODING gzip
HTTP_CONNECTION Keep-Alive
HTTP_HOST www.solutions4advisors.com
HTTP_USER_AGENT CCBot/2.0 (https://commoncrawl.org/faq/)
PATH /bin:/usr/bin
PHP_INI_SCAN_DIR /opt/cpanel/ea-php56/root/etc:/opt/cpanel/ea-php56/root/etc/php.d:.
QUERY_STRING
REDIRECT_SCRIPT_URI http://www.solutions4advisors.com/blog/
REDIRECT_SCRIPT_URL /blog/
REDIRECT_STATUS 200
REDIRECT_UNIQUE_ID XA5KjQZ5pYo10aHmwlM@LQAAABo
REDIRECT_URL /blog/
REDIRECT_W3TC_ENC _gzip
REMOTE_ADDR 52.91.185.49
REMOTE_PORT 53200
REQUEST_METHOD GET
REQUEST_SCHEME http
SCRIPT_FILENAME /home/stanmann/public_html/index.php
SCRIPT_NAME /index.php
SCRIPT_URI http://www.solutions4advisors.com/blog/
SCRIPT_URL /blog/
SERVER_ADDR 96.44.164.40
SERVER_ADMIN webmaster@solutions4advisors.stanmann.com
SERVER_NAME www.solutions4advisors.com
SERVER_PORT 80
SERVER_PROTOCOL HTTP/1.1
SERVER_SIGNATURE
TZ UTC
UNIQUE_ID XA5KjQZ5pYo10aHmwlM@LQAAABo
W3TC_ENC _gzip
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1544440461.04
REQUEST_TIME 1544440461
argv Array ( )
argc 0
empty
0. Whoops\Handler\PrettyPageHandler