{"record":{"id":"a5e2ce18dd47d080","repo":"getgrav/grav","slug":"page-has-no-path","errorCode":null,"errorMessage":"Page has no path","messagePattern":"Page has no path","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"system/src/Grav/Common/Flex/Types/Pages/Storage/PageStorage.php","lineNumber":382,"sourceCode":"     * $row['__META']['copy'] = true       Use this if you want to copy the whole folder, otherwise it will be moved\n     * $row['__META']['clone'] = true      Use this if you want to clone the file, otherwise it will be renamed\n     *\n     * @param string $key\n     * @param array $row\n     * @return array\n     */\n    protected function saveRow(string $key, array $row): array\n    {\n        // Initialize all key-related variables.\n        $newKeys = $this->extractKeysFromRow($row);\n        $newKey = $this->buildStorageKey($newKeys);\n        $newFolder = $this->buildFolder($newKeys);\n        $newFilename = $this->buildFilename($newKeys);\n        $newFilepath = rtrim($newFolder, '/') !== $newFolder ? $newFolder . $newFilename : $newFolder . '/' . $newFilename;\n\n        try {\n            if ($key === '' && empty($row['root'])) {\n                throw new RuntimeException('Page has no path');\n            }\n\n            $grav = Grav::instance();\n\n            /** @var Debugger $debugger */\n            $debugger = $grav['debugger'];\n            $debugger->addMessage(\"Save page: {$newKey}\", 'debug');\n\n            // Check if the row already exists.\n            $oldKey = $row['__META']['storage_key'] ?? null;\n            if (is_string($oldKey)) {\n                // Initialize all old key-related variables.\n                $oldKeys = $this->extractKeysFromRow(['__META' => $row['__META']], false);\n                $oldFolder = $this->buildFolder($oldKeys);\n                $oldFilename = $this->buildFilename($oldKeys);\n\n                // Check if folder has changed.\n                if ($oldFolder !== $newFolder && file_exists($oldFolder)) {","sourceCodeStart":364,"sourceCodeEnd":400,"githubUrl":"https://github.com/getgrav/grav/blob/6040efed04efa69b8209448ed81308e7c24147c2/system/src/Grav/Common/Flex/Types/Pages/Storage/PageStorage.php#L364-L400","documentation":"Error \"Page has no path\" thrown in getgrav/grav.","triggerScenarios":"Thrown at system/src/Grav/Common/Flex/Types/Pages/Storage/PageStorage.php:382 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"}