PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

Getting soft 404 errors (200 status) when Quick Cache is on

Quick Cache Plugin. Speeds up WordPress®.

Getting soft 404 errors (200 status) when Quick Cache is on

Postby macbort » March 21st, 2011, 4:12 pm

Here's the situation I'm currently seeing:

1) Quick Cache is disabled. I visit a known bad link on my site and receive a 404 error. I can verify in Chrome's Inspector and/or Firebug that I'm properly being served the "404 Not Found" status in the HTTP headers.

2) I turn Quick Cache on and visit the same URL. On the initial visit I am served a cached page (verified in at the bottom of the HTML source) and the proper "404 Not Found" status in the HTTP header. But if I visit the page again, I'm served the cached page, but with a "200 OK" status in the HTTP header.

3) If I turn Quick Cache off and visit the page again, I am again being served an uncached page with the correct "404 Not Found" status in the header.

Any idea what's going on here? I can provide more details if there's anything in particular you think I should be looking for.
User avatar
macbort
Registered User
Registered User
 
Posts: 1
Joined: March 21, 2011

Re: Getting soft 404 errors (200 status) when Quick Cache is

Postby Adriano » May 16th, 2011, 5:09 am

I had exactly the same problem,

having goggled "quick cache error 404 cached as 200" and not found an answer I took to edit "advanced-cache.php" myself. I know this is not supposed to be edited directly but by adding the following:


Code: Select all
if (is_404())
{
header("Status: 404 Not Found");
/*return $buffer;*/ /* Do NOT cache. */
}


under "function ws_plugin__qcache_builder ($buffer = FALSE)" fixed my problem.

There were 2 choices:
    1) Set status of page and cache
    2) Not cache

I opted to cache the error page with setting the 404 status.

I was hoping we can get this turned into a permanent code include (otherwise is overwritten every time settings are saved)
User avatar
Adriano
Registered User
Registered User
 
Posts: 1
Joined: May 16, 2011

Re: Getting soft 404 errors (200 status) when Quick Cache is

Postby ffemtkl » January 23rd, 2012, 7:43 am

I am also having this issue, I hope Jason can come to this thread and give his input and offer a fix. He did this for 500 errors, viewtopic.php?f=5&t=591.

FYI... I found this thread that suggests it might be a theme issue, but I am not convinced, http://wordpress.stackexchange.com/ques ... re-enabled
User avatar
ffemtkl
Registered User
Registered User
 
Posts: 20
Joined: June 13, 2011
Location: Jerusalem, Israel


Return to Quick Cache Plugin

Who is online

Users browsing this forum: No registered users and 0 guests

cron