getgrav/grav · error · RuntimeException

Flex saveRow(%s): %s

Error message

Flex saveRow(%s): %s

What it means

Error "Flex saveRow(%s): %s" thrown in getgrav/grav.

Source

Thrown at system/src/Grav/Common/Flex/Types/Pages/Storage/PageStorage.php:465

            if (!isset($file)) {
                $file = $this->getFile($newFilepath);
            }

            // Compare existing file content to the new one and save the file only if content has been changed.
            $file->free();
            $oldRaw = $file->raw();
            $file->content($row);
            $newRaw = $file->raw();
            if ($oldRaw !== $newRaw) {
                $file->save($row);
                $debugger->addMessage("Page content saved: {$newFilepath}", 'debug');
            } else {
                $debugger->addMessage('Page content has not been changed, do not update the file', 'debug');
            }
        } catch (RuntimeException $e) {
            $name = isset($file) ? $file->filename() : $newKey;

            throw new RuntimeException(sprintf('Flex saveRow(%s): %s', $name, $e->getMessage()));
        } finally {
            /** @var UniformResourceLocator $locator */
            $locator = Grav::instance()['locator'];
            $locator->clearCache();

            if (isset($file)) {
                $file->free();
                unset($file);
            }
        }

        $row['__META'] = $this->getObjectMeta($newKey, true);

        return $row;
    }

    /**
     * Check if page folder should be deleted.

View on GitHub (pinned to 6040efed04)

When it happens

Trigger: Thrown at system/src/Grav/Common/Flex/Types/Pages/Storage/PageStorage.php:465 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/dac24295229f0b4e. Report an issue: GitHub.