WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: W3 Total Cache] Facebook connect (8 posts)

  1. smerriman
    Member
    Posted 4 years ago #

    Is this plugin compatible with Facebook Connect? After enabling the page cache I'm unable to post a comment via the plugin. I suspect that this is due to the dynamic javascript the Facebook Connect plugin inserts into the footer of the page - caching this would obviously cause it to break.

    I haven't looked too closely into whether this is the reason it isn't working or not, so let me know if it is meant to work and you need more details.

    http://wordpress.org/extend/plugins/w3-total-cache/

  2. Frederick Townes
    Member
    Posted 4 years ago #

    Yes it works, before switching to intense debate I was using facbeook connect plugin on my personal blog.

  3. smerriman
    Member
    Posted 4 years ago #

    I've investigated the problem further but I really can't see how your plugin can deal with the Facebook Connect one. I turn on the page cache, and load a single post page. I click on the connect link, sign into Facebook, and it refreshes but shows me exactly the same page, without logging me into facebook. If I turn off the page cache and refresh, it now shows me logged in via Facebook.

    As mentioned the Facebook Connect plugin works by inserting different javascript via the wp_footer hook depending on whether you are logged in or not - when the cache is on and I try to log into Facebook, I compared the source and the code hasn't changed one bit. After the cache is disabled the footer code is updated as expected. I'm worried that means if it does happen to cache my logged in status, anyone else will be able to access my Facebook account which is quite possible.

    I noticed in an earlier thread you said you couldn't have certain bits uncached like in WP-Cache/WP-SuperCache - so I really can't understand how you could have gotten this working when the footer MUST be dynamic for the plugin to work. Are you sure you had the page cache enabled on your blog?

  4. Frederick Townes
    Member
    Posted 4 years ago #

    With the plugin specified above, I just retested and found my statement to be correct. Additionally you may want to try adding FBAPIKEY_user to the rejected cookies list on the page cache settings tab.

  5. smerriman
    Member
    Posted 4 years ago #

    OK, so after your posts I thought maybe there was an issue with the theme, but there isn't.

    You can replicate the exact problem as follows:

    1) Install a brand new 2.8.5 version of WordPress (I know the plugin page says only supported 2.8.4, but I doubt that's the problem).

    2) Add <?php do_action('fbc_display_login_button') ?> to the comments template of the WordPress Default theme.

    3) Install WP-FacebookConnect plugin (using a new Facebook application with no settings changed from default), and w3-total-cache plugin (no settings changed).

    4) Visit a permalink, click Facebook Connect icon. Page reloads without being logged into Facebook.

    (Optionally:
    5) Empty the page cache and see you are now logged in via facebook
    6) Click the 'logout from facebook' link in the upper right, the page refreshes to still show the cached page where you are logged in.
    )

    http://www.cre8d-design.com/testfb/?p=1

    For now I guess we'll have to go with disabling the cache when that cookie is set, but it would be nice to have this fixed for a default install at some point as WP-FacebookConnect is a very popular plugin.

  6. Frederick Townes
    Member
    Posted 4 years ago #

    smerriman, those steps were duplicated and the prior solution still stands as the resolution: specify <FB API KEY>_user in the cookie reject list on the page cache tab. Those pages will not be cached, but the plugin will work.

  7. smerriman
    Member
    Posted 4 years ago #

    Yes, I know - as mentioned above, that works, but it would be nice for the default installs to work together. At the least this needs to be mentioned somewhere prominently in the installation instructions.

  8. Frederick Townes
    Member
    Posted 4 years ago #

    I cannot account for the thousands of plugins that have cookies. Many plugins implement cookies incorrectly and require modification to work with numerous other hosting/application related requirements. It's the burden of the facebook connect plugin author to ensure that his instructions stipulate what cookies to take care of. After all, had he done that, I would not have to investigate his work.

    You suggest that compose a list of cookies preset into the plugin? Do you have such a list I might use?

Topic Closed

This topic has been closed to new replies.

About this Topic