{"record":{"id":"6e1226a1ecfaeb86","repo":"getgrav/grav","slug":"root-page-cannot-be-moved-to-s","errorCode":null,"errorMessage":"Root page cannot be moved to %s","messagePattern":"Root page cannot be moved to (.+?)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"system/src/Grav/Common/Flex/Types/Pages/PageObject.php","lineNumber":214,"sourceCode":"            throw new RuntimeException(\n                sprintf('Page content resolves to disallowed markup (%s) after Twig processing. Remove the render-time-assembled tag or attribute.', $found),\n                400\n            );\n        }\n\n        $meta = $this->getMetaData();\n        if (($meta['copy'] ?? false) === true) {\n            $this->folder = $this->getKey();\n        }\n\n        // Figure out storage path to the new route.\n        $parentKey = $this->getProperty('parent_key');\n        if ($parentKey !== '') {\n            $parentRoute = $this->getProperty('route');\n\n            // Root page cannot be moved.\n            if ($this->root()) {\n                throw new RuntimeException(sprintf('Root page cannot be moved to %s', $parentRoute));\n            }\n\n            // Make sure page isn't being moved under itself.\n            $key = $this->getStorageKey();\n\n            /** @var PageObject|null $parent */\n            $parent = $parentKey !== false ? $this->getFlexDirectory()->getObject($parentKey, 'storage_key') : null;\n            if (!$parent) {\n                // Page cannot be moved to non-existing location.\n                throw new RuntimeException(sprintf('Page /%s cannot be moved to non-existing path %s', $key, $parentRoute));\n            }\n\n            // TODO: make sure that the page doesn't exist yet if moved/copied.\n        }\n\n        if ($reorder === true && !$this->root()) {\n            $reorder = $this->_reorder;\n        }","sourceCodeStart":196,"sourceCodeEnd":232,"githubUrl":"https://github.com/getgrav/grav/blob/6040efed04efa69b8209448ed81308e7c24147c2/system/src/Grav/Common/Flex/Types/Pages/PageObject.php#L196-L232","documentation":"Error \"Root page cannot be moved to %s\" thrown in getgrav/grav.","triggerScenarios":"Thrown at system/src/Grav/Common/Flex/Types/Pages/PageObject.php:214 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"}