-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
4.1.13
-
MOODLE_401_STABLE
The site css might be under a url such as:
/theme/styles.php/mytheme/1726031928_1726032167/allĀ
This css file internally is cached in the shared cache dir. However if there is any issues writing to this file, or later on reading from it, then it will serve an empty file with a 200 header and with the caching headers intact. So a downstream caching proxy like varnish or cdn will be poisoned with this bad version forever.
So we need better error protection on both the writing and reading points
fopen(/var/lib/moodlecache/cache/theme/1726031928/mytheme/css/all_1726032167.css.tmp): failed to open stream: No such file or directory in /var/www/site/lib/csslib.php on line 73
stat failed for /var/lib/moodlecache/cache/theme/1726031928/mytheme/css/all_1726032167.css in /var/www/site/lib/csslib.php on line 97
readfile(/var/lib/moodlecache/cache/theme/1726031928/mytheme/css/all_1726032167.css): failed to open stream: No such file or directory in /var/www/site/lib/csslib.php on line 107
Working theory is a race condition with that directory being reset elsewhere at the same time the cache version numbers are reset, so the subdirectory is not readable.