getgrav/grav · error · RuntimeException
Root page cannot be moved to %s
Error message
Root page cannot be moved to %s
What it means
Error "Root page cannot be moved to %s" thrown in getgrav/grav.
Source
Thrown at system/src/Grav/Common/Flex/Types/Pages/PageObject.php:214
throw new RuntimeException(
sprintf('Page content resolves to disallowed markup (%s) after Twig processing. Remove the render-time-assembled tag or attribute.', $found),
400
);
}
$meta = $this->getMetaData();
if (($meta['copy'] ?? false) === true) {
$this->folder = $this->getKey();
}
// Figure out storage path to the new route.
$parentKey = $this->getProperty('parent_key');
if ($parentKey !== '') {
$parentRoute = $this->getProperty('route');
// Root page cannot be moved.
if ($this->root()) {
throw new RuntimeException(sprintf('Root page cannot be moved to %s', $parentRoute));
}
// Make sure page isn't being moved under itself.
$key = $this->getStorageKey();
/** @var PageObject|null $parent */
$parent = $parentKey !== false ? $this->getFlexDirectory()->getObject($parentKey, 'storage_key') : null;
if (!$parent) {
// Page cannot be moved to non-existing location.
throw new RuntimeException(sprintf('Page /%s cannot be moved to non-existing path %s', $key, $parentRoute));
}
// TODO: make sure that the page doesn't exist yet if moved/copied.
}
if ($reorder === true && !$this->root()) {
$reorder = $this->_reorder;
}View on GitHub (pinned to 6040efed04)
When it happens
Trigger: Thrown at system/src/Grav/Common/Flex/Types/Pages/PageObject.php:214 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/6e1226a1ecfaeb86.
Report an issue: GitHub.