In 3.7.0, under some circumstances, enabling the Cache system plugin can result in white pages for some pages
The page should display the same regardless of whether it's been viewed before.
You get a white page.
Happens if using file for storage.
This is caused by a change in the lock function of the file cache storage backend: https://github.com/joomla/joomla-cms/blob/staging/libraries/joomla/cache/storage/file.php#L354
It was changed from (J! 3.6.5)
$_fileopen = @fopen($path, 'r+b');
to (J! 3.7.0)
$_fileopen = @fopen($path, 'c+b');
This causes the cache file for a given page to be created when we check for its existence (it's created with an empty content of course) during onAfterInitialize.
Now later on, during onAfterRespond, nothing is stored in that file, because the menu item has been excluded from caching, but the empty file is still there.
Upon subsequent requests for the same page, the empty file is found during onAfterInitialize and thus loaded and displayed, resulting in a white page.
I don't know why this was changed, but I suspect this should simply be reverted. An alternative would be to only display the cached content if the cache file is not empty, but that doesn't sound right.
Change: d2dd941
Note: I only tested this on windows, but PHP's fopen c flag is supposed to behave the same on all systems, and will create that file. I do have reports from users experiencing the same on standard hosting, which is why I looked into it.
Labels |
Added:
?
|
Category | ⇒ | com_cache |
Ah crap, I did search quite a bit, including the closed issues!
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-05-02 10:03:14 |
Closed_By | ⇒ | weeblr |
I have a similar issue with firefox 55.0 (64 bits) - Debian Sid on github.com
Please create a new issue as comments on closed issues will not be seen
It is done at #15592