Twig \ Error \ LoaderError
The "/var/www/html/wp-content/themes/xentum-v3/views" directory does not exist ("/var/www/html/wp-content/themes/xentum-v3/views"). Twig\Error\LoaderError thrown with message "The "/var/www/html/wp-content/themes/xentum-v3/views" directory does not exist ("/var/www/html/wp-content/themes/xentum-v3/views")." Stacktrace: #10 Twig\Error\LoaderError in /var/www/html/wp-content/timber2-upgrade/vendor/twig/twig/src/Loader/FilesystemLoader.php:102 #9 Twig\Loader\FilesystemLoader:addPath in /var/www/html/wp-content/timber2-upgrade/vendor/timber/timber/src/Loader.php:344 #8 Timber\Loader:Timber\{closure} in [internal]:0 #7 array_map in /var/www/html/wp-content/timber2-upgrade/vendor/timber/timber/src/Loader.php:340 #6 Timber\Loader:get_loader in /var/www/html/wp-content/timber2-upgrade/vendor/timber/timber/src/Loader.php:290 #5 Timber\Loader:choose_template in /var/www/html/wp-content/timber2-upgrade/vendor/timber/timber/src/Timber.php:1395 #4 Timber\Timber:compile in /var/www/html/wp-content/timber2-upgrade/vendor/timber/timber/src/Timber.php:1701 #3 Timber\Timber:render in /var/www/html/wp-content/themes/xentum-timber2/template-news.php:42 #2 include in /var/www/html/wp-includes/template-loader.php:132 #1 require_once in /var/www/html/wp-blog-header.php:19 #0 require in /var/www/html/index.php:17
Stack frames (11)
10
Twig\Error\LoaderError
…/vendor/twig/twig/src/Loader/FilesystemLoader.php:102
9
Twig\Loader\FilesystemLoader addPath
…/vendor/timber/timber/src/Loader.php:344
8
Timber\Loader Timber\{closure}
[internal]:0
7
array_map
…/vendor/timber/timber/src/Loader.php:340
6
Timber\Loader get_loader
…/vendor/timber/timber/src/Loader.php:290
5
Timber\Loader choose_template
…/vendor/timber/timber/src/Timber.php:1395
4
Timber\Timber compile
…/vendor/timber/timber/src/Timber.php:1701
3
Timber\Timber render
/var/www/html/wp-content/themes/xentum-timber2/template-news.php:42
2
include
/var/www/html/wp-includes/template-loader.php:132
1
require_once
/var/www/html/wp-blog-header.php:19
0
require
/var/www/html/index.php:17
/var/www/html/wp-content/timber2-upgrade/vendor/twig/twig/src/Loader/FilesystemLoader.php
        $this->paths[$namespace] = [];
        foreach ($paths as $path) {
            $this->addPath($path, $namespace);
        }
    }
 
    /**
     * @param bool $check Whether to check that the directory exists; pass false when the caller already checked it
     *
     * @throws LoaderError
     */
    public function addPath(string $path, string $namespace = self::MAIN_NAMESPACE/* , bool $check = true */): void
    {
        // invalidate the cache
        $this->cache = $this->errorCache = [];
 
        if (\func_num_args() < 3 || func_get_arg(2)) {
            $checkPath = $this->isAbsolutePath($path) ? $path : $this->rootPath.$path;
            if (!is_dir($checkPath)) {
                throw new LoaderError(\sprintf('The "%s" directory does not exist ("%s").', $path, $checkPath));
            }
        }
 
        $this->paths[$namespace][] = rtrim($path, '/\\');
    }
 
    /**
     * @param bool $check Whether to check that the directory exists; pass false when the caller already checked it
     *
     * @throws LoaderError
     */
    public function prependPath(string $path, string $namespace = self::MAIN_NAMESPACE/* , bool $check = true */): void
    {
        // invalidate the cache
        $this->cache = $this->errorCache = [];
 
        if (\func_num_args() < 3 || func_get_arg(2)) {
            $checkPath = $this->isAbsolutePath($path) ? $path : $this->rootPath.$path;
            if (!is_dir($checkPath)) {
                throw new LoaderError(\sprintf('The "%s" directory does not exist ("%s").', $path, $checkPath));
Arguments
  1. "The "/var/www/html/wp-content/themes/xentum-v3/views" directory does not exist ("/var/www/html/wp-content/themes/xentum-v3/views")."
    
/var/www/html/wp-content/timber2-upgrade/vendor/timber/timber/src/Loader.php
            [$paths],
            '2.0.0',
            'timber/locations'
        );
 
        $open_basedir = \ini_get('open_basedir');
        $rootPath = '/';
        if ($open_basedir) {
            $rootPath = null;
        }
 
        $fs = new FilesystemLoader([], $rootPath);
 
        foreach ($paths as $namespace => $path_locations) {
            if (\is_array($path_locations)) {
                \array_map(function ($path) use ($fs, $namespace) {
                    if (\is_string($namespace)) {
                        $fs->addPath($path, $namespace);
                    } else {
                        $fs->addPath($path, Loader::MAIN_NAMESPACE);
                    }
                }, $path_locations);
            } else {
                Helper::deprecated(
                    'add_filter( \'timber/loader/paths\', [\'path/to/my/templates\'] ) in a non-associative array',
                    'add_filter( \'timber/loader/paths\', [ 0 => [ \'path/to/my/templates\' ] ] )',
                    '2.0.0'
                );
                $fs->addPath($path_locations, self::MAIN_NAMESPACE);
            }
        }
 
        /**
         * Filters …
         *
         * @todo Add summary, description, example, parameter description
         *
         * @link https://github.com/timber/timber/pull/1254
         * @since 1.1.11
         */
[internal]
/var/www/html/wp-content/timber2-upgrade/vendor/timber/timber/src/Loader.php
         * @param array $paths
         */
        $paths = \apply_filters_deprecated(
            'timber/loader/paths',
            [$paths],
            '2.0.0',
            'timber/locations'
        );
 
        $open_basedir = \ini_get('open_basedir');
        $rootPath = '/';
        if ($open_basedir) {
            $rootPath = null;
        }
 
        $fs = new FilesystemLoader([], $rootPath);
 
        foreach ($paths as $namespace => $path_locations) {
            if (\is_array($path_locations)) {
                \array_map(function ($path) use ($fs, $namespace) {
                    if (\is_string($namespace)) {
                        $fs->addPath($path, $namespace);
                    } else {
                        $fs->addPath($path, Loader::MAIN_NAMESPACE);
                    }
                }, $path_locations);
            } else {
                Helper::deprecated(
                    'add_filter( \'timber/loader/paths\', [\'path/to/my/templates\'] ) in a non-associative array',
                    'add_filter( \'timber/loader/paths\', [ 0 => [ \'path/to/my/templates\' ] ] )',
                    '2.0.0'
                );
                $fs->addPath($path_locations, self::MAIN_NAMESPACE);
            }
        }
 
        /**
         * Filters …
         *
         * @todo Add summary, description, example, parameter description
/var/www/html/wp-content/timber2-upgrade/vendor/timber/timber/src/Loader.php
    protected function render_twig_template($template, $data)
    {
        return $template->render($data);
    }
 
    /**
     * 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.
     */
    public function choose_template($templates)
    {
        // Change $templates into array, if needed
        if (!\is_array($templates)) {
            $templates = (array) $templates;
        }
 
        // Get Twig loader
        $loader = $this->get_loader();
 
        // Run through template array
        foreach ($templates as $template) {
            // Remove any whitespace around the template name
            $template = \trim((string) $template);
            // Use the Twig loader to test for existence
            if ($loader->exists($template)) {
                // Return name of existing template
                return $template;
            }
        }
 
        // No existing template was found
        return false;
    }
 
    /**
     * @return FilesystemLoader
     */
    public function get_loader()
/var/www/html/wp-content/timber2-upgrade/vendor/timber/timber/src/Timber.php
     * $team_member = Timber::compile( 'team-member.twig', $data );
     * ```
     * @param array|string    $filenames        Name or full path of the Twig file to compile. If this is an array of file
     *                                          names or paths, Timber will compile the first file that exists.
     * @param array           $data             Optional. An array of data to use in Twig template.
     * @param bool|int|array  $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 Timber\Loader.
     * @param bool            $via_render       Optional. Whether to apply optional render or compile filters. Default false.
     * @return bool|string                      The returned output.
     */
    public static function compile($filenames, $data = [], $expires = false, $cache_mode = Loader::CACHE_USE_DEFAULT, $via_render = false)
    {
        if (!\defined('TIMBER_LOADED')) {
            self::init();
        }
        $caller = LocationManager::get_calling_script_dir(1);
        $loader = new Loader($caller);
        $file = $loader->choose_template($filenames);
 
        $caller_file = LocationManager::get_calling_script_file(1);
 
        /**
         * Fires after the calling PHP file was determined in Timber’s compile
         * function.
         *
         * This action is used by the Timber Debug Bar extension.
         *
         * @since 1.1.2
         * @since 2.0.0 Switched from filter to action.
         *
         * @param string|null $caller_file The calling script file.
         */
        \do_action('timber/calling_php_file', $caller_file);
 
        if ($via_render) {
            /**
             * Filters the Twig template that should be rendered.
             *
/var/www/html/wp-content/timber2-upgrade/vendor/timber/timber/src/Timber.php
     * 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 or full path of the Twig file to render. If this is an array of file
     *                                       names or paths, Timber will render the first file that exists.
     * @param array          $data           Optional. An array of data to use in Twig template.
     * @param bool|int|array $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 Timber\Loader.
     */
    public static function render($filenames, $data = [], $expires = false, $cache_mode = Loader::CACHE_USE_DEFAULT): void
    {
        $output = self::compile($filenames, $data, $expires, $cache_mode, true);
        echo $output;
    }
 
    /**
     * Renders a Twig block from a Twig file.
     *
     * Passes data to a Twig file and echoes the output of a specific block.
     *
     * @api
     * @param string         $block_name     The name of the block to render.
     * @param array|string   $filenames      Name or full path of the Twig file to render. If this is an array of file
     *                                       names or paths, Timber will render the first file that exists.
     * @param array          $data           Optional. An array of data to use in Twig template.
     * @param string|array|null $caller      Optional. A value produced by a `LocationManager` method to control
     *                                       template lookup. Pass either `LocationManager::get_calling_script_dir()`
     *                                       (string path) or `LocationManager::get_locations()` (array of search
     *                                       locations). When `null`, Timber will default to
     *                                       `LocationManager::get_calling_script_dir(1)`.
     * @param bool|int|array $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.
/var/www/html/wp-content/themes/xentum-timber2/template-news.php
$context['categories'] = Timber::get_terms(array(
    'taxonomy' => 'category',
    'hide_empty' => true,
) );
 
$args = array(
    'post_type'      => array('post'),
    'posts_per_page' => 9,
    'orderby'        => 'date',
    'order'          => 'DESC',
    'paged'          => $paged
);
 
$posts = Timber::get_posts($args);
 
$context['posts_total'] = $posts->found_posts;
 
$context['posts'] = $posts;
 
Timber::render('template-news.twig', $context );
 
/var/www/html/wp-includes/template-loader.php
     */
    $template   = apply_filters( 'template_include', $template );
    $is_stringy = is_string( $template ) || ( is_object( $template ) && method_exists( $template, '__toString' ) );
    $template   = $is_stringy ? realpath( (string) $template ) : null;
    if (
        is_string( $template ) &&
        ( str_ends_with( $template, '.php' ) || str_ends_with( $template, '.html' ) ) &&
        is_file( $template ) &&
        is_readable( $template )
    ) {
        /**
         * Fires immediately before including the template.
         *
         * @since 6.9.0
         *
         * @param string $template The path of the template about to be included.
         */
        do_action( 'wp_before_include_template', $template );
 
        include $template;
    } elseif ( current_user_can( 'switch_themes' ) ) {
        $theme = wp_get_theme();
        if ( $theme->errors() ) {
            wp_die( $theme->errors() );
        }
    }
    return;
}
 
Arguments
  1. "/var/www/html/wp-content/themes/xentum-timber2/template-news.php"
    
/var/www/html/wp-blog-header.php
<?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';
 
}
 
Arguments
  1. "/var/www/html/wp-includes/template-loader.php"
    
/var/www/html/index.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';
 
Arguments
  1. "/var/www/html/wp-blog-header.php"
    

Environment & details:

empty
empty
empty
empty
empty
Key Value
SERVER_SOFTWARE
"Apache/2.4.62 (Rocky Linux) OpenSSL/3.5.8"
REQUEST_URI
"/financial-planning-resources/page/10/"
USER
"wwwuser"
HOME
"/var/www/html"
SCRIPT_NAME
"/index.php"
QUERY_STRING
""
REQUEST_METHOD
"GET"
SERVER_PROTOCOL
"HTTP/2.0"
GATEWAY_INTERFACE
"CGI/1.1"
REDIRECT_URL
"/financial-planning-resources/page/10/"
REMOTE_PORT
"4069"
SCRIPT_FILENAME
"//var/www/html/index.php"
SERVER_ADMIN
"root@localhost"
CONTEXT_DOCUMENT_ROOT
"/var/www/html"
CONTEXT_PREFIX
""
REQUEST_SCHEME
"https"
DOCUMENT_ROOT
"/var/www/html"
REMOTE_ADDR
"216.73.217.92"
SERVER_PORT
"443"
SERVER_ADDR
"64.227.41.11"
SERVER_NAME
"v7s894yntx2.c.updraftclone.com"
SERVER_SIGNATURE
""
PATH
"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin"
HTTP_HOST
"v7s894yntx2.c.updraftclone.com"
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
"*/*"
H2_STREAM_TAG
"136455-212-3"
H2_STREAM_ID
"3"
H2_PUSHED_ON
""
H2_PUSHED
""
H2_PUSH
"off"
H2PUSH
"off"
HTTP2
"on"
SSL_TLS_SNI
"v7s894yntx2.c.updraftclone.com"
HTTPS
"on"
HTTP_AUTHORIZATION
""
REDIRECT_STATUS
"200"
REDIRECT_H2_STREAM_TAG
"136455-212-3"
REDIRECT_H2_STREAM_ID
"3"
REDIRECT_H2_PUSHED_ON
""
REDIRECT_H2_PUSHED
""
REDIRECT_H2_PUSH
"off"
REDIRECT_H2PUSH
"off"
REDIRECT_HTTP2
"on"
REDIRECT_SSL_TLS_SNI
"v7s894yntx2.c.updraftclone.com"
REDIRECT_HTTPS
"on"
REDIRECT_HTTP_AUTHORIZATION
""
FCGI_ROLE
"RESPONDER"
PHP_SELF
"/index.php"
REQUEST_TIME_FLOAT
1795623192.6421
REQUEST_TIME
1795623192
empty
0. Whoops\Handler\PrettyPageHandler