• Hi there!

    I installed W3 Total cache this week, and so far, it’s been working perfectly… except for 1 thing. Not sure if it’s the only thing affected so far, so we’ll see.

    Since the cache has been running, the Facebook share feature of my posts have stopped working. If I push the button, or simply share the link on facebook directly, the link appears on Facebook, but it has no picture attachment or description. As soon as I deactivate the W3 plugin, it starts to work again…

    Any idea of what could be the problem?

    Thank you!

Viewing 15 replies - 1 through 15 (of 22 total)
  • Thread Starter geekpub

    (@geekpub)

    A few extra details:

    I kept the plugin enabled (with the minify and CDN option turned on), and only disabled the page caching option, and everything started working again. As soon as I turned Page caching on again, it stopped working.

    Thread Starter geekpub

    (@geekpub)

    Some additional Details:

    I compared the source of each page, after and before enabling caching (one worked on facebook, the other didnt), and the ONLY difference in the page is this.

    NO CACHED (below)
    ———-
    < Content Delivery Network via geeksaresexy.geeksaresexytech.netdna-cdn.com
    <
    < Served from: https://www.geeksaresexy.net @ 2010-04-13 00:55:29 –>

    ———————-
    CACHED (below)
    ——
    > Page Caching using disk (enhanced)
    > Content Delivery Network via geeksaresexy.geeksaresexytech.netdna-cdn.com
    >
    > Served from: https://www.geeksaresexy.net @ 2010-04-13 00:50:06 –>

    It makes absolutely no sense to me.

    Thread Starter geekpub

    (@geekpub)

    Another update: Most user agents (Stumble upon, etc..) get a 404 when accessing any page with the page caching option on. Even the W3C validator gets served a 404! https://validator.w3.org/

    After disabling it, the page is accessible again.

    I tried using my old hypercache plugin with W3 (page caching off + W3 minify on + W3 CDN on), and it seems to be working fine.

    Any idea why W3 cached pages could be serving 404s to user agents?

    Even the W3C validator gets served a 404! https://validator.w3.org/

    Try moving the W3TC .htaccess directives in the root of your blog directly above the WordPress directives, so that you have things in the following order (starting from the top of the file of course):

    1. Your own directives
    2. W3TC Directives
    3. WordPress Directives

    Alternatively you can quickly test disk basic mode for page caching and see if your share buttons behave properly in that case. You should also find that disabling HTML minify may have some effect.

    Thread Starter geekpub

    (@geekpub)

    Thanks Frederick! ??

    Putting the cache in Disk basic mode made everything work… and page creation time is as quick as with enhanced mode… as soon as I put it back in enhanced, it stops working.

    Are there any advantages of tweaking my htaccess to make the cache work in enhanced mode?

    Also, when you say “move the W3TC .htaccess directive” to the root of my blog, you’re talking about the one in wp-content\w3tc\pgcache right?

    Thanks for the awesome plugin! ??

    Yan

    In enhanced mode you will basically be able to serve more pages per second. No, I’m talking about the .htaccess in your document root for example in public_html (depending on your host).

    Thread Starter geekpub

    (@geekpub)

    Hmmm, there’s no W3TC Directives in the root .htaccess of my site… only wordpress stuff and some security tweaks.

    You need to switch to disk enhanced page cache for that to either see what to add in a notification or have the plugin automatically append them.

    Thread Starter geekpub

    (@geekpub)

    Hmm, moved the directives on top of the .htaccess file, still the same results..

    So I installed and enabled xcache. which seemed to have solved the problem. Xcache doesn’t add anything to the .htaccess file.

    Question: does it bring the same performance benefits as the disc (enhanced) mode?

    Thank alot for your time Frederick, I really appreciate what you’re doing.

    Are you sure you had those directives in the right order, I said that W3TC should not be at the top.

    Thread Starter geekpub

    (@geekpub)

    Yeah, I also tried moving them under my directives, on top of the wordpress ones. and got the same results.

    Can you paste your directives here then?

    Thread Starter geekpub

    (@geekpub)

    Here you go:

    Note that I had additional security directives in the middle, but I removed them for the test.

    As I said, the plugin works fine with xCache.. is there any reasons why I should be using the disc (enhanced) mode instead?

    <Limit GET HEAD POST>
    order allow,deny
    allow from all
    </LIMIT>

    <files wp-config.php>
    Order deny,allow
    deny from all
    </files>

    Header unset ETag
    FileETag None

    ** <W3TC DIRECTIVES HERE> **

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    For standalone servers you can handle more requests per second using disk enhanced mode for page cache. Is your blog installed in a subdirectory? Using the latest version?

    Thread Starter geekpub

    (@geekpub)

    I’m running on a VPS, and yes, I’m using the latest version of your plugin.. (re-installed yesterday)

    The blog is running in a folder named geeksaresexy.net

Viewing 15 replies - 1 through 15 (of 22 total)
  • The topic ‘Problem with Facebook Share W3 Total Cache’ is closed to new replies.