getgrav/grav · error · RuntimeException
Token path not found: %s
Error message
Token path not found: %s
What it means
Error "Token path not found: %s" thrown in getgrav/grav.
Source
Thrown at system/src/Grav/Common/Utils.php:1776
if ($object instanceof PageInterface) {
return trim($object->relativePagePath() . $basename, '/');
}
}
break;
case 'theme':
if ($matches[1] === '') {
$route = '/' . $matches[2];
$theme = $grav['locator']->findResource('theme://', false);
if (false !== $theme) {
return trim($theme . $route, '/');
}
}
break;
}
throw new RuntimeException(sprintf('Token path not found: %s', $path));
}
/**
* Returns [token, route, path] from '@token/route:/path'. Route and path are optional. If pattern does not match, return null.
*
* @param string $path
* @return string[]|null
*/
protected static function resolveTokenPath(string $path): ?array
{
if (str_contains($path, '@')) {
$regex = '/^(@\w+|\w+@|@\w+@)([^:]*)(.*)$/u';
if (preg_match($regex, $path, $matches)) {
return [
trim($matches[1], '@'),
trim($matches[2], '/'),
trim($matches[3], ':/')
];View on GitHub (pinned to 6040efed04)
When it happens
Trigger: Thrown at system/src/Grav/Common/Utils.php:1776 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/911772573995b810.
Report an issue: GitHub.