Forums

Problem with Facebook Share + W3 Total Cache (23 posts)

  1. geekpub
    Member
    Posted 2 years ago #

    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!

  2. geekpub
    Member
    Posted 2 years ago #

    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.

  3. geekpub
    Member
    Posted 2 years ago #

    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: http://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: http://www.geeksaresexy.net @ 2010-04-13 00:50:06 -->

    It makes absolutely no sense to me.

  4. geekpub
    Member
    Posted 2 years ago #

    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! http://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! http://validator.w3.org/

  5. Frederick Townes
    Member
    Posted 2 years ago #

    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.

  6. geekpub
    Member
    Posted 2 years ago #

    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

  7. Frederick Townes
    Member
    Posted 2 years ago #

    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).

  8. geekpub
    Member
    Posted 2 years ago #

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

  9. Frederick Townes
    Member
    Posted 2 years ago #

    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.

  10. geekpub
    Member
    Posted 2 years ago #

    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.

  11. Frederick Townes
    Member
    Posted 2 years ago #

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

  12. geekpub
    Member
    Posted 2 years ago #

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

  13. Frederick Townes
    Member
    Posted 2 years ago #

    Can you paste your directives here then?

  14. geekpub
    Member
    Posted 2 years ago #

    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

  15. Frederick Townes
    Member
    Posted 2 years ago #

    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?

  16. geekpub
    Member
    Posted 2 years ago #

    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

  17. geekpub
    Member
    Posted 2 years ago #

    When I activate the cache (disc enhanced) and use the W3 Validator, the 1st checkup, when the page is uncached, runs fine. the second one, when a cached page is served, I get a 403 Forbidden.... not a 404, that was my error.

  18. geekpub
    Member
    Posted 2 years ago #

    and running latest version of WP too :)

  19. Frederick Townes
    Member
    Posted 2 years ago #

    And the issue is gone when using disk basic page cache method?

  20. geekpub
    Member
    Posted 2 years ago #

    Yes, gone... it works with xcache as well.

  21. Frederick Townes
    Member
    Posted 2 years ago #

    You would need to submit a bug submission report for me to investigate further. There are no known related issues.

  22. Paula Brooks
    Member
    Posted 2 years ago #

    There are no known related issues.

    There is now... because I am having exactly the same problems on my site....

  23. Frederick Townes
    Member
    Posted 2 years ago #

    Have you both submitted bug submissions using the support tab of the plugin?

Topic Closed

This topic has been closed to new replies.

About this Topic