{"record":{"id":"911772573995b810","repo":"getgrav/grav","slug":"token-path-not-found-s","errorCode":null,"errorMessage":"Token path not found: %s","messagePattern":"Token path not found: (.+?)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"system/src/Grav/Common/Utils.php","lineNumber":1776,"sourceCode":"                    if ($object instanceof PageInterface) {\n                        return trim($object->relativePagePath() . $basename, '/');\n                    }\n                }\n\n                break;\n            case 'theme':\n                if ($matches[1] === '') {\n                    $route = '/' . $matches[2];\n                    $theme = $grav['locator']->findResource('theme://', false);\n                    if (false !== $theme) {\n                        return trim($theme . $route, '/');\n                    }\n                }\n\n                break;\n        }\n\n        throw new RuntimeException(sprintf('Token path not found: %s', $path));\n    }\n\n    /**\n     * Returns [token, route, path] from '@token/route:/path'. Route and path are optional. If pattern does not match, return null.\n     *\n     * @param string $path\n     * @return string[]|null\n     */\n    protected static function resolveTokenPath(string $path): ?array\n    {\n        if (str_contains($path, '@')) {\n            $regex = '/^(@\\w+|\\w+@|@\\w+@)([^:]*)(.*)$/u';\n            if (preg_match($regex, $path, $matches)) {\n                return [\n                    trim($matches[1], '@'),\n                    trim($matches[2], '/'),\n                    trim($matches[3], ':/')\n                ];","sourceCodeStart":1758,"sourceCodeEnd":1794,"githubUrl":"https://github.com/getgrav/grav/blob/6040efed04efa69b8209448ed81308e7c24147c2/system/src/Grav/Common/Utils.php#L1758-L1794","documentation":"Error \"Token path not found: %s\" thrown in getgrav/grav.","triggerScenarios":"Thrown at system/src/Grav/Common/Utils.php:1776 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6040efed04efa69b8209448ed81308e7c24147c2","analyzedAt":"2026-08-17T05:07:31.593Z","schemaVersion":2},"datasetVersion":"2026-08-17T09:17:11.063Z"}