diff --git a/CHANGELOG.md b/CHANGELOG.md index 6cdb6fcbb..2c4898be0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,13 @@ * Fixed remote URLs in markdown if using subfolder setup * Fixed calls to undefined `Media` methods, they will now return `null` in order to fix twig templates with undefined variables +# v1.7.34 +## mm/dd/2022 + +1. [](#bugfix) + * Regression: Fixed saving page with a new language causing cache corruption [getgrav/grav-plugin-admin#2282](https://github.com/getgrav/grav-plugin-admin/issues/2282) + * Fixed a potential fatal error when using watermark in images + # v1.7.33 ## 04/25/2022 diff --git a/system/src/Grav/Common/File/CompiledFile.php b/system/src/Grav/Common/File/CompiledFile.php index 9393ab70f..eaf46f702 100644 --- a/system/src/Grav/Common/File/CompiledFile.php +++ b/system/src/Grav/Common/File/CompiledFile.php @@ -138,6 +138,10 @@ trait CompiledFile $class = get_class($this); $size = filesize($filename); + // Reload data from the filesystem. This ensures that we always cache the correct data (see issue #2282). + $this->raw = $this->content = null; + $data = (array)$this->decode($this->raw()); + // Decode data into compiled array. $cache = [ '@class' => $class,