• Hello!

    We’ve been using W3 mostly without issues on our site (pistilsnursery.com) for several years.

    However today I noticed that pages are sporadically not loading, and instead displaying gibberish (see: https://pistilsnursery.com/wp-content/uploads/2017/01/Screen-Shot-2017-01-19-at-4.05.30-PM.png).

    I tested the issue by disabling other plugins that were recently updated, but this did not resolve the issue.

    I then started testing W3, purging the caches and refreshing the page. This did not work. Disabling W3 entirely, however, solves the issue.

    My wordpress admin remains functional regardless of whether W3 is enabled or disabled. However, only when enabled do I see the gibberish pages. When enabled, I currently use Page cache, Database cache, and Browser cache. I haven’t updated these settings since initially setting up the plugin, years ago. I am using the most current version of the plugin (0.9.5.2).

    Please let me know how to fix this issue! Happy to provide any additional information.

    Thank you very much in advance,
    Jesse

Viewing 15 replies - 1 through 15 (of 25 total)
  • You are on php 5.3?

    Try to bisable gzip compression in browser settings.

    It seems a bug on php 5.3 and gzip compression enabled.

    Hi! We at the W3 Total Cache Fixed Community figured out what was causing the problem.

    Here’s the fix:

    Note: This specific fix is for people seeing garbled text that looks similar to this or this.

    1. Open PgCache_ContentGrabber.php (found in the w3-total-cache directory)

    2. Jump down to line 1244 which should show:

    if ( isset( $value0['n'] ) ) {

    3. Replace that line with:

    if ( is_array($value0) && isset( $value0['n'] ) ) {

    Hopefully you’ll come back and post your results so others can get confirmation.

    Thanks
    Kimberly

    • This reply was modified 7 years, 10 months ago by Kimberly.
    • This reply was modified 7 years, 10 months ago by Kimberly.
    • This reply was modified 7 years, 10 months ago by Kimberly.

    I had the same issue. Edited PgCache_ContentGrabber.php and now everything is OK. Thanks Kimberly ??

    Confirming that change on line 1244 did the job! Had the same issue, now works fine. Thanks Kimberly ??

    We disabled the plugin (Version 0.9.5.2 on WordPress 4.7.1) initially to correct the problem, and we modified Line 1244 (as recommended above).

    However, we are unable to reactive the plugin. We receive a “Plugin activated.” message, but the plugin remains inactive.

    Thread Starter jessepistils

    (@jessepistils)

    Hey Kimberly,

    Thank you so much for the fix – I’ve just implemented it and no errors so far, so it seems to be working!

    A quick follow up question for you –

    My web host (Media Temple) actually happens to be updating our PHP version in a few days to v5.6.21. When this upgrade happens, will I need to revert the PgCache_ContentGrabber.php to the original line of code?

    Thank you!
    Jesse

    @jesse the fix of Kimberly is safe for each php version.

    I have just removed the plugin from our installation.
    Do we get an update for this or a patch?

    I do not want the website offline after a update because losing money while customers can no longer buy.

    • This reply was modified 7 years, 10 months ago by AukeJomm.

    @aukejomm my fix shown above will work (if you are specifically getting garbled text and using php 5.3.x or lower). And the next official release of w3tc will incorporate my fix so you shouldnt be worried that a future update will creep the same problem again.

    Kimberly

    This fix works. I had the same problem, however, I’m using php 5.6.29… So I don’t think it is just related to 5.3.x or lower.

    It works. Thank you so much Kimberly @amiga500 for the fix. You’re awesome!

    • This reply was modified 7 years, 10 months ago by aidwa.
    • This reply was modified 7 years, 10 months ago by aidwa.

    Thank you for this fix! Saved my day.

    I’m sorry kimberly but I’m completely new to this and I have no idea on how to do what you say will fix the problem, can you guide me step by step? I deactivate w3 and deleted it, and now everything works fine but I would like to use w3 total cache so if you or anybody can explain literally every step to me it would be nice. thank you!

    • This reply was modified 7 years, 10 months ago by derrik85.
    • This reply was modified 7 years, 10 months ago by derrik85.

    I am attempting to deal with what I think is the same problem, but line 1244 in mine reads:

    if ( $this->_config->get_boolean( ‘browsercache.html.last_modified’ ) ) {

    Here is the file path:

    web root/xxxxxx/wp-content / plugins.bak / w3-total-cache / PgCache_ContentGrabber.php

    Am I looking in the wrong place?

    Thank you,

    Fernjl

    @fernjl – you might be using an early version. I just looked at a copy of 0.9.5.1 and line 1244 was identical to yours. If this is the case I don’t think you will see this problem.

    @amiga500 – thanks for the fix! We had just upgraded a dozen sites to 0.9.5.2, so the fix really came in handy.

Viewing 15 replies - 1 through 15 (of 25 total)
  • The topic ‘Website sporatically breaks with W3 enabled’ is closed to new replies.