WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: W3 Total Cache] Disk enhanced fails with URL rewrite (patch included) (9 posts)

  1. normadize
    Member
    Posted 1 year ago #

    I tried submitting a bug report from the Support > Submit bug report inside WP but it fails, without a further explanation. So I'm writing it here.

    Disk enhanced page caching is not working at all for me (apache and litespeed tested) on W3TC 0.9.2.4. It always fails with the message:

    "It appears Page Cache URL rewriting is not working. If using apache, verify that the server configuration allows .htaccess or if using nginx verify all configuration files are included in the configuration."

    Which is not very specific, really. After some close debugging, I found the bug in TotalCacheAdmin.php, line 5294. It should be changed from:

    $result = (!is_wp_error($response) && $response['response']['code'] == 200 && trim($response['body']) == 'OK');

    to

    $result = (!is_wp_error($response) && $response['response']['code'] == 200 && trim($response['response']['message']) == 'OK');

    $response['body'] actually holds the html body of the response, not the response message (e.g. "OK"). Also, I may add that checking for 200 should be enough, there isn't really a need to check for "OK" as well.

    Regards,

  2. Frederick Townes
    Member
    Posted 1 year ago #

    Actually the behavior is correct. The plugin echos a OK to the page when a  rewrite is successfull so checking response body is correct.

    To see if Disc Enhanced is actually working you'll need to enable Debugging and check the HTML source and the datetime entires at the bottom of the page.

  3. Frederick Townes
    Member
    Posted 1 year ago #

    Actually the behavior is correct. The plugin echos a OK to the page when a  rewrite is successfull so checking response body is correct.

    To see if Disc Enhanced is actually working you'll need to enable Debugging and check the HTML source and the datetime entires at the bottom of the page.

  4. normadize
    Member
    Posted 1 year ago #

    I don't know what to say, $response['body'] contained html source (i.e. <html><body> ...... The setup I have is with WP in a sub-folder, not in the root of the website but I'm not sure if that's the cause.

    Doing the change I suggested fixes the problem for me and the plugin then works fine.

  5. Frederick Townes
    Member
    Posted 1 year ago #

    Ok it shouldn't contain any HTML only the "OK". So something does go wrong. But if the caching works go ahead with your fix. If you want me to look at it send a bug report from the support page in the plugin.

  6. normadize
    Member
    Posted 1 year ago #

    If you read my first post here you'll see that I tried submitting a bug report from the support page and it failed, without giving any errors. I reported it here and gave full explanations so you have everything you need to fix it. It's your software, I can't be bothered any further I'm afraid.

  7. Frederick Townes
    Member
    Posted 1 year ago #

    Sorry, if you send me an email through the web site, I'd be happy to take a look.

  8. normadize
    Member
    Posted 1 year ago #

    Sorry but like I said, you have all the info in my first post here if you want to take a look.

  9. nytrm
    Member
    Posted 1 year ago #

    Remember to disable maintenance plugins when activating

Topic Closed

This topic has been closed to new replies.

About this Topic