Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Contributor iSaumya

    (@isaumya)

    Hi @richmandan,
    If you are using the latest version of the plugin, inside the plugin settings > Other tab, scroll down and you will see an option named “Remove cache buster query string” along with an implementation guide.

    Check the implementation guide and add the Cache Rule no. 1-3. Then come back to the plugin settings page and enable that option. Purge your cache and you are good to go.

    I’ve used this feature and everything seems to be working fine. There are just two problems:

    The Settings page of the plugin will have swcfpc=1:

    https://*.com/wp-admin/options-general.php?page=wp-cloudflare-super-page-cache-index&swcfpc=1

    In addition, the page performs a 301 redirect

    When logged in:

    *.com/*/ => ?*.com/*?swcfpc=1

    When not logged in:

    *.com/*/ =>?*.com/*

    In addition, *.com?swcfpc=1 is Bypass Cache

    Are these expected behaviors?

    I mean after the Remove cache buster query string is enabled

    Plugin Contributor iSaumya

    (@isaumya)

    Hi @trivisa,
    I have personally never seen the issue you have mentioned on the settings page. But the other other you have mentioned regarding the redirect for logged-in user when the trailing slash is not present, I have seen that issue and trust me I have looked at the code many times to see what might be causing that, but so far I have not found a single place that might be causing that issue. Beside it will not cause any problem to your website beside the little annoyance.

    Hi@isaumya ,

    After I delete , $this->objects['cache_controller']->get_cache_buster() => 1 ,The ?swcfpc=1 in the admin_bar href is no longer displayed.

    \wp-cloudflare-page-cache\libs\backend.class.php:278
    
    'href' => current_user_can('manage_options') ? add_query_arg( array( 'page' => 'wp-cloudflare-super-page-cache-index', $this->objects['cache_controller']->get_cache_buster() => 1), admin_url('options-general.php')) : '#',
    Plugin Contributor iSaumya

    (@isaumya)

    Hi @trivisa,
    Can you try this build of the plugin and let me know if this resolves both the issue you have mentioned above. Looking forward to your feedback.

    Hi@isaumya ,
    Admin_bar href is solved.
    Redirection is not solved.
    —–
    On the admin page, most pages don’t redirect, but some do.
    admin.php?page=opcache-page&swcfpc=1 => admin.php?page=opcache-page&swcfpc=1

    x-qm-redirects-redirect-trace 
    wp_safe_redirect(), flush_opcache(), 
    do_action('admin_init')
    function flush_opcache()
    {
        if (isset($_GET['flush_opcache']) && $_GET['flush_opcache'] === 'true' && wp_verify_nonce($_GET['_wpnonce'], 'flush_opcache')) {
            opcache_reset();
            wp_safe_redirect(admin_url('admin.php?page=opcache-page'));
            exit;
        }
    }
    add_action('admin_init', 'flush_opcache');

    —–
    Not on the admin page,The home page does not redirect.

    When logged in:

    *.com/*/ => *.com/*?swcfpc=1

    When not logged in:
    No redirection.

    • This reply was modified 1 year, 7 months ago by trivisa.
    Plugin Contributor iSaumya

    (@isaumya)

    Hi @trivisa,
    Happy to hear that the admin bar href issue is resolved. But I still don’t understand why the ?swcfpc=1 is getting added when users are logged in and redirection is happening. There is no code in there that can be doing that. I have checked multiple times. Besides the flush_opcache() is not part of this plugin’s code.

    If you find out why it is happening, please do let me know I would love to dig further.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘swcfpc=1 added to links’ is closed to new replies.