Error
Class 'DOMDocument' not found Error thrown with message "Class 'DOMDocument' not found" Stacktrace: #14 Error in /home/autodrom/public_html/offroad/wp-content/plugins/gantry5/src/classes/Gantry/Component/Twig/TwigExtension.php:518 #13 Gantry\Component\Twig\TwigExtension:parseAssetsFunc in /home/autodrom/public_html/offroad/wp-content/cache/gantry5/g5_hydrogen/twig/29/298bd0831a7255e95dd51cce488a1a2d710219fe6bc3c084deda5ae77d385bbc.php:65 #12 __TwigTemplate_20a15897cdf936f0f85034cc03cb584bc32d300c08329bca4f17b324987965a1:doDisplay in /home/autodrom/public_html/offroad/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:455 #11 Twig\Template:displayWithErrorHandling in /home/autodrom/public_html/offroad/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:422 #10 Twig\Template:display in /home/autodrom/public_html/offroad/wp-content/cache/gantry5/g5_hydrogen/twig/49/49e2e4308afb5854a62ae036f035131158d06def59012267d185f1c9c88296e2.php:38 #9 __TwigTemplate_ba97f1f7b34d47fdb5e9effeab3dce57f9e29005f7565574a1074e8cc4b3a14b:doDisplay in /home/autodrom/public_html/offroad/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:455 #8 Twig\Template:displayWithErrorHandling in /home/autodrom/public_html/offroad/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:422 #7 Twig\Template:display in /home/autodrom/public_html/offroad/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:434 #6 Twig\Template:render in /home/autodrom/public_html/offroad/wp-content/plugins/gantry5/src/vendor/twig/twig/src/TemplateWrapper.php:47 #5 Twig\TemplateWrapper:render in /home/autodrom/public_html/offroad/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Environment.php:384 #4 Twig\Environment:render in /home/autodrom/public_html/offroad/wp-content/plugins/gantry5/src/classes/Gantry/Framework/Theme.php:141 #3 Gantry\Framework\Theme:render in /home/autodrom/public_html/offroad/wp-content/themes/g5_hydrogen/page.php:36 #2 include in /home/autodrom/public_html/offroad/wp-includes/template-loader.php:106 #1 require_once in /home/autodrom/public_html/offroad/wp-blog-header.php:19 #0 require in /home/autodrom/public_html/offroad/index.php:17
Stack frames (15)
14
Error
/classes/Gantry/Component/Twig/TwigExtension.php518
13
Gantry\Component\Twig\TwigExtension parseAssetsFunc
/home/autodrom/public_html/offroad/wp-content/cache/gantry5/g5_hydrogen/twig/29/298bd0831a7255e95dd51cce488a1a2d710219fe6bc3c084deda5ae77d385bbc.php65
12
__TwigTemplate_20a15897cdf936f0f85034cc03cb584bc32d300c08329bca4f17b324987965a1 doDisplay
/vendor/twig/twig/src/Template.php455
11
Twig\Template displayWithErrorHandling
/vendor/twig/twig/src/Template.php422
10
Twig\Template display
/home/autodrom/public_html/offroad/wp-content/cache/gantry5/g5_hydrogen/twig/49/49e2e4308afb5854a62ae036f035131158d06def59012267d185f1c9c88296e2.php38
9
__TwigTemplate_ba97f1f7b34d47fdb5e9effeab3dce57f9e29005f7565574a1074e8cc4b3a14b doDisplay
/vendor/twig/twig/src/Template.php455
8
Twig\Template displayWithErrorHandling
/vendor/twig/twig/src/Template.php422
7
Twig\Template display
/vendor/twig/twig/src/Template.php434
6
Twig\Template render
/vendor/twig/twig/src/TemplateWrapper.php47
5
Twig\TemplateWrapper render
/vendor/twig/twig/src/Environment.php384
4
Twig\Environment render
/classes/Gantry/Framework/Theme.php141
3
Gantry\Framework\Theme render
/home/autodrom/public_html/offroad/wp-content/themes/g5_hydrogen/page.php36
2
include
/home/autodrom/public_html/offroad/wp-includes/template-loader.php106
1
require_once
/home/autodrom/public_html/offroad/wp-blog-header.php19
0
require
/home/autodrom/public_html/offroad/index.php17
     * @param string $input
     * @param string $location
     * @param int $priority
     * @return string
     */
    public function parseAssetsFunc($input, $location = 'head', $priority = 0)
    {
        if ($location === 'head') {
            $scope = 'head';
            $html = "<!doctype html>\n<html><head>{$input}</head><body></body></html>";
        } else {
            $scope = 'body';
            $html = "<!doctype html>\n<html><head></head><body>{$input}</body></html>";
        }
 
        libxml_clear_errors();
 
        $internal = libxml_use_internal_errors(true);
 
        $doc = new \DOMDocument();
        $doc->loadHTML($html);
        foreach (libxml_get_errors() as $error) {
            $this->dealXmlError($error, $html);
        }
 
        libxml_clear_errors();
 
        libxml_use_internal_errors($internal);
 
        $raw = [];
        /** @var \DomElement $element */
        foreach ($doc->getElementsByTagName($scope)->item(0)->childNodes as $element) {
            if (empty($element->tagName)) {
                continue;
            }
            $result = ['tag' => $element->tagName, 'content' => $element->textContent];
            foreach ($element->attributes as $attribute) {
                $result[$attribute->name] = $attribute->value;
            }
            $success = Gantry::instance()['document']->addHeaderTag($result, $location, (int) $priority);
            throw new UnexpectedValueException('{% scripts with x %}: x is not an array');
        }
        $location = "head";
        if ($location && !is_string($location)) {
            throw new UnexpectedValueException('{% scripts in x %}: x is not a string');
        }
        $priority = isset($assetVariables['priority']) ? $assetVariables['priority'] : 0;
        ob_start();
        // line 5
        echo "    ";
        $this->displayBlock('head_stylesheets', $context, $blocks);
        // line 15
        $this->displayBlock('head_platform', $context, $blocks);
        // line 16
        echo "
    ";
        // line 17
        $this->displayBlock('head_overrides', $context, $blocks);
        $content = ob_get_clean();
        $assetFunction($content, $location, $priority);
        // line 24
        echo "<head>
    ";
        // line 25
        echo twig_join_filter($this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "document", []), "getHtml", [0 => "head_top"], "method"), "
    ");
        echo "
    ";
        // line 26
        $this->displayBlock('head_meta', $context, $blocks);
        // line 52
        $this->displayBlock('head_title', $context, $blocks);
        // line 56
        echo "
    ";
        // line 57
        $this->displayBlock('head_application', $context, $blocks);
        // line 61
        echo "
    ";
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
            $this->doDisplay($context, $blocks);
        } catch (Error $e) {
            if (!$e->getSourceContext()) {
                $e->setSourceContext($this->getSourceContext());
            }
 
            // this is mostly useful for \Twig\Error\LoaderError exceptions
            // see \Twig\Error\LoaderError
            if (-1 === $e->getTemplateLine()) {
                $e->guess();
            }
 
            throw $e;
        } catch (\Exception $e) {
            $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
            $e->guess();
 
            throw $e;
        }
    }
 
    {
        return $this;
    }
 
    /**
     * Returns all blocks.
     *
     * This method is for internal use only and should never be called
     * directly.
     *
     * @return array An array of blocks
     */
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Exception $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
        parent::__construct($env);
 
        $this->blocks = [
            'head_title' => [$this, 'block_head_title'],
            'head_application' => [$this, 'block_head_application'],
            'head_platform' => [$this, 'block_head_platform'],
            'head' => [$this, 'block_head'],
        ];
    }
 
    protected function doGetParent(array $context)
    {
        // line 1
        return "@nucleus/page_head.html.twig";
    }
 
    protected function doDisplay(array $context, array $blocks = [])
    {
        $this->parent = $this->loadTemplate("@nucleus/page_head.html.twig", "partials/page_head.html.twig", 1);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }
 
    // line 3
    public function block_head_title($context, array $blocks = [])
    {
        // line 4
        echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=";
        echo twig_escape_filter($this->env, $this->getAttribute(($context["site"] ?? null), "charset", []), "html", null, true);
        echo "\" />
    <link rel=\"profile\" href=\"http://gmpg.org/xfn/11\" />
    <link rel=\"pingback\" href=\"";
        // line 6
        echo twig_escape_filter($this->env, $this->getAttribute(($context["site"] ?? null), "pingback_url", []), "html", null, true);
        echo "\" />";
    }
 
    // line 9
    public function block_head_application($context, array $blocks = [])
    {
        // line 10
            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.
     *
 
    /**
     * @see AbstractTheme::render()
     *
     * @param string $file
     * @param array $context
     * @return string
     */
    public function render($file, array $context = [])
    {
        static $timberContext;
 
        if (!isset($timberContext)) {
            $timberContext = Timber::get_context();
        }
 
        // Include Gantry specific things to the context.
        $context = array_replace($timberContext, $context);
 
        return $this->renderer()->render($file, $context);
    }
 
    public function set_template_layout()
    {
        $assignments = new Assignments;
        $selected = $assignments->select();
 
        if (GANTRY_DEBUGGER) {
            \Gantry\Debugger::addMessage('Selecting outline (rules, matches, scores):', 'debug');
            \Gantry\Debugger::addMessage($assignments->getPage(), 'debug');
            \Gantry\Debugger::addMessage($assignments->matches(), 'debug');
            \Gantry\Debugger::addMessage($assignments->scores(), 'debug');
        }
 
        $this->setLayout($selected);
    }
 
    public function widgets_init()
    {
        $gantry = Gantry::instance();
 *
 * This is the template that displays all pages by default.
 * Please note that this is the WordPress construct of pages
 * and that other 'pages' on your WordPress site will use a
 * different template.
 *
 * To generate specific templates for your pages you can use:
 * /mytheme/views/page-mypage.html.twig
 * (which will still route through this PHP file)
 * OR
 * /mytheme/page-mypage.php
 * (in which case you'll want to duplicate this file and save to the above path)
 */
 
$gantry = Gantry\Framework\Gantry::instance();
$theme  = $gantry['theme'];
 
// We need to render contents of <head> before plugin content gets added.
$context              = Timber::get_context();
$context['page_head'] = $theme->render('partials/page_head.html.twig', $context);
 
$post            = Timber::query_post();
$context['post'] = $post;
 
Timber::render(['page-' . $post->post_name . '.html.twig', 'page.html.twig'], $context);
 
            }
 
            break;
        }
    }
 
    if ( ! $template ) {
        $template = get_index_template();
    }
 
    /**
     * Filters the path of the current template before including it.
     *
     * @since 3.0.0
     *
     * @param string $template The path of the template to include.
     */
    $template = apply_filters( 'template_include', $template );
    if ( $template ) {
        include $template;
    } elseif ( current_user_can( 'switch_themes' ) ) {
        $theme = wp_get_theme();
        if ( $theme->errors() ) {
            wp_die( $theme->errors() );
        }
    }
    return;
}
 
<?php
/**
 * Loads the WordPress environment and template.
 *
 * @package WordPress
 */
 
if ( ! isset( $wp_did_header ) ) {
 
    $wp_did_header = true;
 
    // Load the WordPress library.
    require_once __DIR__ . '/wp-load.php';
 
    // Set up the WordPress query.
    wp();
 
    // Load the theme template.
    require_once ABSPATH . WPINC . '/template-loader.php';
 
}
 
<?php
/**
 * Front to the WordPress application. This file doesn't do anything, but loads
 * wp-blog-header.php which does and tells WordPress to load the theme.
 *
 * @package WordPress
 */
 
/**
 * Tells WordPress to load the WordPress theme and output it.
 *
 * @var bool
 */
define( 'WP_USE_THEMES', true );
 
/** Loads the WordPress Environment and Template */
require __DIR__ . '/wp-blog-header.php';
 

Environment & details:

empty
empty
empty
Key Value
aiovg_rand_seed 1321159455
empty
Key Value
SERVER_SOFTWARE Apache
REQUEST_URI /offroad/na-prezent/
PHP_FCGI_MAX_REQUESTS 99999
PHPRC /home/autodrom/fcgi-bin/../etc/php7.3
PWD /home/autodrom/fcgi-bin
SHLVL 0
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
CONTENT_LENGTH 0
HTTP_CONNECTION close
SCRIPT_NAME /offroad/index.php
QUERY_STRING
REQUEST_METHOD GET
SERVER_PROTOCOL HTTP/1.1
GATEWAY_INTERFACE CGI/1.1
REDIRECT_URL /offroad/na-prezent/
REMOTE_PORT 6566
SCRIPT_FILENAME /home/autodrom/public_html/offroad/index.php
SERVER_ADMIN [no address given]
CONTEXT_DOCUMENT_ROOT /home/autodrom/public_html
CONTEXT_PREFIX
REQUEST_SCHEME https
DOCUMENT_ROOT /home/autodrom/public_html
REMOTE_ADDR 3.14.132.178
SERVER_PORT 443
SERVER_ADDR 46.4.72.6
SERVER_NAME autodrom.lovetty.ovh
SERVER_SIGNATURE
HTTP_HOST autodrom.lovetty.ovh
HTTP_COOKIE aiovg_rand_seed=1321159455
HTTP_REFERER https://autodrom.lovetty.ovh/offroad/na-prezent
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 */*
SSL_TLS_SNI autodrom.lovetty.ovh
HTTPS on
HTTP_AUTHORIZATION
SCRIPT_URI https://autodrom.lovetty.ovh/offroad/na-prezent/
SCRIPT_URL /offroad/na-prezent/
REDIRECT_STATUS 200
REDIRECT_SSL_TLS_SNI autodrom.lovetty.ovh
REDIRECT_HTTPS on
REDIRECT_HTTP_AUTHORIZATION
REDIRECT_SCRIPT_URI https://autodrom.lovetty.ovh/offroad/na-prezent/
REDIRECT_SCRIPT_URL /offroad/na-prezent/
FCGI_ROLE RESPONDER
PHP_SELF /offroad/index.php
REQUEST_TIME_FLOAT 1732354948.5158
REQUEST_TIME 1732354948
empty
0. Whoops\Handler\PrettyPageHandler