• thellimist

    (@furkan811)


    Hi all,

    Cloudflare WordPress Plugin version 3.1.0 changelog:

    Disabled showing WordPress Admin Bar and Edit Post Link to avoid caching problems for users using HTML Caching.

    We’ve disable these two sections in your blog regarding of people who are using Cache Everything Page Rule to make their site even faster.

    This page rule enables Cloudflare to cache the HTML of your website. It’s much much faster compared to normal caching but there is a downside where the blog manually need to purge Cloudflare cache everytime a page is edited.

    We recommend users with Cache Everything page rule to use Automatic Cache Purge feature of the plugin which purges Cloudflare cache without user intervention.

    Disabling Admin Bar and Edit Post Link would allows users guaranteeing to see the blog content without admin features.

    For users who would like to re-enable Admin Bar and Edit Post Link can do the following.

    Prerequisite: Access to your server is required.

    1) Open the file path_of_wordpress/wp-content/plugins/cloudflare/cloudflare.loader.php
    3) Edit lines 27 and 28 by putting “//” (two slashes) in the beginning of the lines.

    https://github.com/cloudflare/Cloudflare-WordPress/blob/master/cloudflare.loader.php#L27-L28

    It should look like

    //add_filter('show_admin_bar', '__return_false');
    //add_filter('edit_post_link', '__return_null');

    In the next version we’ll target disabling these features only for the intended target.

    If you have any concerns or suggestions please leave a comment.

    Thanks.
    -furkan

Viewing 8 replies - 16 through 23 (of 23 total)
  • kashmiri

    (@kashmiri)

    I am not getting it. Admin area is NEVER cached by any caching plugins. It is not served as static HTML and CF won’t cache it either. Did you indeed have any issues with admin caching previously?

    • This reply was modified 8 years ago by kashmiri.
    jwineman

    (@jwineman)

    @kashmiri,

    Its not the admin area, its the bar that shows up at the top of the screen that shows up if you view your own blog posts as an admin.

    Thanks,
    John

    Andrew Miguelez

    (@andrewmiguelez)

    Sorry if I’m beating a dead horse, but the documentation around this seems to leave a lot up to assumption.

    Am I to understand that if I don’t have a “Cache Everything” rule enabled, then the Automatic Cache Management setting is basically unnecessary to me?

    I enabled it because all it says on the plugin settings page is: Purge Cloudflare cache automatically when you update the appearance of your site. That made it seem to me like if I didn’t enable that setting, parts of my site would be outdated due to caching when I post something new. I think a little more context would be very helpful, especially for users like me who are new, and less technically savvy users too.

    Thanks for you help.

    Thread Starter thellimist

    (@furkan811)

    Hi @andrewmiguelez,

    Automatic Cache Management does multiple things;

    1) Clear Cloudflare cache when a theme is modified (like banner image etc.)
    2) Clear Cloudflare cache when a theme is switched (Using a new theme)
    3) Clear Cloudflare cache when a post is published/edited/deleted.

    If you’re using Cloudflare standard cache option you’d need Automatic Cache Management for #1 and #2. If you’re using Cache Everything page rule enabled you’d need Automatic Cache Management for #1, #2, #3 cases.

    Thanks

    AMX

    (@lightscapes)

    I am using WP-Rocket to manage Cloudflare and have this problem with the admin bar. It appears for anonymous users after I activated caching everything. Caching everything except wp-* is great and makes the site fast, but this admin bar is a terrible bug and very embarrassing.

    Can I use your Cloudflare plugin with WP-Rocket and does your plugin solve now the issue with the admin bar?

    Thread Starter thellimist

    (@furkan811)

    Hi @lightscapes,

    I haven’t used WP-Rocket. Do you want to disable admin-bar for caching everything? If so yes you can use Cloudflare plugin and enable Automatic Cache Management feature to support cache everything page rule.

    Cloudflare Plugin has multiple other features. None of them should have a conflict with WP-Rocket.

    AMX

    (@lightscapes)

    Hi @furkan811,

    Thank you for the quick response.
    My problem is that after enabling html caching on Cloudflare, anonymous visitors can sometimes see the admin bar on the front page and some other pages (what’s even worse with my username in the corner), which is very embarrassing.

    As admin, I would like to continue to use the admin bar when logged-in and working on the website. Does your plugin disable the admin bar completely, I mean for all visitors, whether logged-in or not? Or only for the page “views” that are cached on Cloudflare?

    Caching everything on Cloudflare is great, but I was forced to disable it because of the admin bar appearing for anonymous visitors.

    Best regards,
    Tom

    Thread Starter thellimist

    (@furkan811)

    Does your plugin disable the admin bar completely

    If Automatic Cache Management is toggled, the plugin disables post edit link and admin bar completely.

    anonymous visitors can sometimes see the admin bar on the front page and some other pages

    Whenever cloudflare cache is purged, the first request served from cloudflare server in that area will be cached. If the only admin is you the best you can do is whenever you purge cache you have to make a request from a non-logged in user and ensure it is cached. Alternatively admin bar can be disabled which is what we’re doing. We’ve a better solution for enterprise customers with bypass cookie feature. You may want to look into that.

    For more information please contact support.cloudflare.com.

    Thanks

Viewing 8 replies - 16 through 23 (of 23 total)
  • The topic ‘Anouncement: Disabling Admin Bar’ is closed to new replies.