WordPress.org

Support

Support » Plugins and Hacks » [Plugin: WP Super Cache] Junk / Garbled Text Pages

[Plugin: WP Super Cache] Junk / Garbled Text Pages

  • Has anyone noticed if your cached enabled WP blog sometimes showed completely garbled text instead of what it should be? This happened to me a few times, and I’m wondering if it was because I sometimes manually delete the cache within the admin page so I can inspect changes I’ve made to my theme. I stopped doing that and simply disable the plugin when I’m customizing my themes. So far the issue hasn’t reoccured.

    Weird.

    http://wordpress.org/extend/plugins/wp-super-cache/

Viewing 15 replies - 1 through 15 (of 20 total)
  • I remember this came up before when the wrong character encoding was used. The plugin now defaults to using UTF-8 which works for most people. Have you changed the encoding in your options page?

    I haven’t changed anything when installing but lemme checkie….

    Nope, it’s using UTF-8. =) I did have to import my WordPress posts and comments from an older 2.0 fork so I wonder if that might have been a factor. Other than that weird issue, the cache is working cleanly. I’ll just avoid clearing the cache in the future to be safe. =D

    This is turning out to be a more serious problem than I thought. My home page resulted in garbage text showing out of the blue, though I haven’t touched anything in Super Cache for a few days. I wonder what’s causing it? I was using a slightly older version though so I’m updating to 0.6.6 and flushed the cache again to see if that resolves the issue.

    Other than UTF-8, what else could cause a problem like this?

    I occasionally had this issue until I disabled the gzip compression.

    Dunno why it happens, but that seems to fix it for my specific case.

    Hmmm, that’s interesting. I’ve been reading about gzip and it seems it’s better to have it done server side than using a php script anyway. Maybe it might be best use htaccess for this, and then use Super Cache with gzip disabled and that might do the trick.

    Well oddly enough my server doesn’t have mod_gzip enabled. That sucky McSucketh. =P

    This is a serious problem. Today i upgraded to wp 2.6.1. and wp super cache to the newest version.

    and after that i get Junk / Garbled Text Pages too … deleted wp-super-cache and everyting is fine again. so i guess i must run my blog without a cache plug now ? 🙁

    damn … what can it be…. my blog is UTF-8 encoded. hopefully someone finds a fix for that. 🙁

    Have you got mod_deflate installed? If so, try removing it and see if that makes a difference.

    sharebrain: It’s the Gzip that causes it, why I don’t know. Just keep that disabled, and the rest of the cache should work fine.

    Though for my particular server, both Super Cache and Gzip is too resource intensive for some reason and actually adds to the load time of my site. My site went down during a massive StumbleUpon spike and only went up again when I disabled Super Cache. Yes, really. Just goes to show how server configuration can have a major impact on how well your plugins run.

    For the future, I intend to use the feature of Super Cache that allows me to cache only one page, which really is all I’d need it for anyway. 😀

    I’ve found the solution: if your pages are encoded in UTF-8 with the BOM the grabled text shows up. If you encode the page in UTF-8 without the BOM the page is displayed correctly.

    Just to clarify on my last post: supercache was working fine with my UTF-8 with BOM files prior to wordpress 2.6.1.

    Is wordpress now using the php “header” function that it wasn’t using before? If so then the BOM (byte order mark) will be written before the ‘header’ function can be called, thus throwing a wrench in the whole process.

    It’s just a guess. I haven’t studied the changes.

    Where’s this BOM showing up and can it be removed?

    The BOM is at the beginning of the file. (see http://unicode.org/faq/utf_bom.html#29 )

    Yes the BOM can be removed. If you’re on Windows just use Notepad++ and click “Format > Convert to UTF-8 without BOM”. Otherwise you’ll have to open the file with a hex editor and remove the first three bytes (0xEF 0xBB 0xBF).

    Which file would I need to change, the super cache file?

    Change the header template file. Also, you should check the other parts of the template to make sure they don’t have BOMs. If they do they will further corrupt the output. (e.g. a BOM on the top of the footer template would actually be added near the bottom of the generated output.)

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘[Plugin: WP Super Cache] Junk / Garbled Text Pages’ is closed to new replies.
Skip to toolbar