getgrav/grav · error · LoaderError

Unable to find one of the following templates: "%s".

Error message

Unable to find one of the following templates: "%s".

What it means

Error "Unable to find one of the following templates: "%s"." thrown in getgrav/grav.

Source

Thrown at system/src/Grav/Common/Twig/TwigEnvironment.php:102

            }
            if ($name instanceof TemplateWrapper) {
                return $name;
            }

            // Optimization: Avoid throwing an exception when it would be ignored anyway.
            if (1 !== $count) {
                /** @var LoaderInterface|ExistsLoaderInterface $loader */
                $loader = $this->getLoader();
                if (!$loader->exists($name)) {
                    continue;
                }
            }

            // Throws LoaderError: Unable to find template "%s".
            return $this->load($name);
        }

        throw new LoaderError(sprintf('Unable to find one of the following templates: "%s".', implode('", "', $names)));
    }
}

View on GitHub (pinned to 6040efed04)

When it happens

Trigger: Thrown at system/src/Grav/Common/Twig/TwigEnvironment.php:102 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of getgrav/grav@6040efed04 (2026-08-17). Data as JSON: /api/errors/fe061ffc06ff3f78. Report an issue: GitHub.