?
avatar OctavianC
OctavianC
28 Apr 2017

Steps to reproduce the issue

Didn't know exactly what title to write. There are a couple of issues and I've noticed them when using the System - Page Cache plugin.

You'll need to use the File Cache Handler (this is the default though) in Global Configuration.

  1. Let's add a new menu item. It doesn't matter what it is.
  2. Go to Extensions > Plugins and edit the System - Page Cache plugin.
  3. Exclude the menu item you've created in step 1.
  4. Set the plugin status to Enabled.
  5. Navigate to the frontend to the excluded menu item - works fine.
  6. Refresh the page - blank page. Until cache is refreshed, you'll always see a blank page.

Expected result

Not a blank page :)

Actual result

Blank page!

System information (as much as possible)

3.7.0 stable

Additional comments

Looking in the cache/page folder I can see that locking the cache files has written 0 bytes to each file. Now, because we have excluded the page from caching, the store() part in the onAfterRespond() event of the System - Page Cache plugin won't run and we're stuck with these files.
The blank page is rendered because of the code in the onAfterInitialize() event:

$data = $this->_cache->get($this->_cache_key);

if ($data !== false)

In this case (cache files exist & they're 0 length), $data is null and the code runs. Now, I'm guessing this could be solved by:

if ($data !== false && $data !== null)

But, if you dig deeper in the code, the issue is caused by JCache::getWorkarounds() - $body is null and if there's no data in the cache file, it will return the $body. If we default $body to false the issue should be resolved. Thoughts?

avatar OctavianC OctavianC - open - 28 Apr 2017
avatar joomla-cms-bot joomla-cms-bot - change - 28 Apr 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 28 Apr 2017
avatar brianteeman
brianteeman - comment - 28 Apr 2017

see #15592

avatar OctavianC OctavianC - edited - 28 Apr 2017
avatar OctavianC
OctavianC - comment - 28 Apr 2017

I really should be searching more before posting

avatar brianteeman brianteeman - change - 28 Apr 2017
The description was changed
Status New Closed
Closed_Date 0000-00-00 00:00:00 2017-04-28 08:21:00
Closed_By brianteeman
avatar brianteeman brianteeman - close - 28 Apr 2017

Add a Comment

Login with GitHub to post a comment