• Resolved sholaytech

    (@sholaytech)


    Hi,

    I have just come across your plugin and thought it will be great to use it with cloudflare as advertised. The site is setup with woocommerce, and Dokan and the challenge I am having despite following all your instructions in configuring the cache rules for the Cache Everything page rule in Cloudflare are that when logged into a user account, and on the front-end of the site, which consists of the homepages, products, and service pages amongst others, on some of the front-end pages, I am able to see the User Menu at the top of the page for My Account and other affiliated buttons, to Browse Listings or Add listings depending on the role of the user logged in, however, on some pages like the Home page and one or two more frontend pages, I am unable to see these and all I can see is the option to sign in and when the button is selected, it takes me back to the signing in page again. This goes on and on like this even if I sign in again. Although some Pages on inspection show HIT and confirm the Super Page Cache for Cloudflare as enabled, I also note that not all the pages on the front-end show this, like the Products pages on the front-end, when I inspect them or is this supposed to be so?

    You can visit the site and see for yourself.

    Thanks

    The page I need help with: [log in to see the link]

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

    (@isaumya)

    Hi @sholaytech,
    Inside the plugin settings > Other tab, scroll down and you will see an option to “Remove Cache Buster Query Sting” along with the implementation guide.

    Check the implementation guide and add the cache rules (don’t add the cache rule no 4). Then once the cache rules are added then enable the option insde the plugin settings and enable the option.

    Then try and check if your issue has been resolved or not.

    Link: https://gist.github.com/isaumya/af10e4855ac83156cc210b7148135fa2

    Thread Starter sholaytech

    (@sholaytech)

    Dear @isaumya Happy New Year and thank you for your response.

    I have followed your above instructions again to remove the 4th cache rule and re-enabled the “Remove Cache Buster Query String”. However, the problem is still there, and now when I even click on a button that should take me to the user’s profile on the frontend, it takes me back to the login page to re-enter credentials and does the same thing over again.

    I am not using any other cache plugin except for the Perfmatters as recommended by you. You can also create a dummy account to see this issue for yourself.

    Thanks for your help.

    Plugin Contributor iSaumya

    (@isaumya)

    can you screen record the issue and share the screen recording so that I can see the issue in action and how to reproduce it

    Thread Starter sholaytech

    (@sholaytech)

    Hi @isaumya I have tried to recreate the problem in the video on the link below.

    Looking forward to your response.

    thanks

    Plugin Contributor iSaumya

    (@isaumya)

    Hi @sholaytech,
    I think I understand why it’s happening. But just to double-check, can you please provide a vendor dummy username and password so that I can run some checks? You can share the username and password to replicate the issue via https://safenote.co/

    Thread Starter sholaytech

    (@sholaytech)

    Plugin Contributor iSaumya

    (@isaumya)

    Hi @sholaytech,
    Thanks for the info. Can you please edit the Cache Rule No 3 with the following:

    (
      http.host eq "alacada.co.uk" and
      (http.cookie contains "wordpress_logged_in_" or http.cookie contains "comment_" or http.cookie contains "woocommerce_" or http.cookie contains "wordpressuser_" or http.cookie contains "wordpresspass_" or http.cookie contains "wordpress_sec_" or http.cookie contains "yith_wcwl_products" or http.cookie contains "edd_items_in_cart" or http.cookie contains "it_exchange_session_" or http.cookie contains "comment_author" or http.cookie contains "dshack_level" or http.cookie contains "auth_" or http.cookie contains "noaffiliate_" or http.cookie contains "mp_session" or http.cookie contains "xf_" or http.cookie contains "mp_globalcart_" or http.cookie contains "dokan_pro_vendor_verify_") and
      not http.request.uri.path contains "."
    )

    I’m sure this will resolve your issue. Please try and let me know.

    Thread Starter sholaytech

    (@sholaytech)

    @isaumya is it just “alacada.co.uk” or “https://alacada.co.uk”, because all along I have used the latter (https://alacada.co.uk) to setup the cache rule for the site.

    Thanks

    Thread Starter sholaytech

    (@sholaytech)

    @isaumya I don’t know how wordpress managed to change what typed to https://alacada.co.uk” but what I meant to type is

    “is it just “alacada.co.uk” or “https://alacada.co.uk” because all along I have used the latter (https://alacada.co.uk) to setup the cache rule for the site.

    Thanks”

    Plugin Contributor iSaumya

    (@isaumya)

    Hi @sholaytech,
    for the cache rule just use alacada.co.uk cause we are checking just the hostname so no need for the https:// part.

    Thread Starter sholaytech

    (@sholaytech)

    Thanks @isaumya I have applied the changes and I now see those user buttons back, so I am not sure if the problem was entirely down to me having previously included the “https://” to the domain name while creating the cache rules or not, because as soon as I took them off and used the new 3rd cache rule they started showing again.

    I still have a concern though and wondered if it is something to worry about or not. When I used the Google chrome inspect tool to check the pages whilst I am logged in I noticed that the cf-cache-status is DYNAMIC on all the pages on the site even when in the wp-admin pages. Should this be so as I also observed your plugin showing as x-wp-cf-super-cache: no-cache ?

    See the details received for this below:

    • alt-svc: h3=”:443″; ma=86400, h3-29=”:443″; ma=86400
    • cache-control: no-store, no-cache, must-revalidate, max-age=0
    • cf-cache-status: DYNAMIC
    • cf-ray: 7834924b6942743b-LHR
    • content-encoding: br
    • content-type: text/html; charset=UTF-8
    • date: Mon, 02 Jan 2023 15:36:41 GMT
    • expires: Mon, 02 Jan 2023 15:36:41 GMT
    • nel: {“success_fraction”:0,”report_to”:”cf-nel”,”max_age”:604800}
    • pragma: no-cache
    • report-to: {“endpoints”:[{“url”:”https:\/\/a.nel.cloudflare.com\/report\/v3?s=yYMl9Nw4b4AQTUuGN8rEyZMfPIB9s%2FGFu7cqNAZipzRy269f8lcy7WaraJtzliTIzyrfvl3SJVyFO%2FeSZ04LVZ6Hsti1vfJHm4geBtC%2BUUOExwlB5kkwbhdwGcjZN7D2″}],”group”:”cf-nel”,”max_age”:604800}
    • server: cloudflare
    • set-cookie: dokan_pro_vendor_verify_b58cf00a3b09d42f81aad723759b6b98=4852238454ad210caab17441aad2b033%7C%7C1672674101%7C%7C1a9f4e4c9db8625776172be2e51b10c4%7C%7Ca%3A0%3A%7B%7D; expires=Mon, 02-Jan-2023 15:41:41 GMT; Max-Age=300; path=/; secure; HttpOnly
    • vary: Accept-Encoding
    • x-wp-cf-super-cache: no-cache
    • x-wp-cf-super-cache-cache-control: no-store, no-cache, must-revalidate, max-age=0

    When I am logged out, the cf-cache-status is still DYNAMIC and your plugin shows as : x-wp-cf-super-cache-active: 1

    See details

    • alt-svc: h3=”:443″; ma=86400, h3-29=”:443″; ma=86400
    • cache-control: s-maxage=31536000, max-age=60
    • cf-cache-status: DYNAMIC
    • cf-ray: 783494eb8bac72af-LHR
    • content-encoding: br
    • content-type: text/html; charset=UTF-8
    • date: Mon, 02 Jan 2023 15:38:28 GMT
    • nel: {“success_fraction”:0,”report_to”:”cf-nel”,”max_age”:604800}
    • report-to: {“endpoints”:[{“url”:”https:\/\/a.nel.cloudflare.com\/report\/v3?s=pVry54dDqHNbF8Q0NSupdl6mxTDPtAmRpKvndbKRkwLWgaMQfiCJQjWdsWgtCcuW%2BZsSwI0Rug8Ha6YExRCwye5g85v5pDB064DeorgEhLGEFB4y28Xv1za4Vp2UO5YX”}],”group”:”cf-nel”,”max_age”:604800}
    • server: cloudflare
    • vary: Accept-Encoding
    • x-wp-cf-super-cache: cache
    • x-wp-cf-super-cache-active: 1
    • x-wp-cf-super-cache-cache-control: s-maxage=31536000, max-age=60
    • x-wp-cf-super-cache-cookies-bypass: swfpc-feature-not-enabled
    • Is this how it is supposed to behave? I noticed on your plugin you said that it should be “HIT” for the cf-cache-status
    • You can check for yourself if you do not mind.

    Thanks a bunch for your help.

    Plugin Contributor iSaumya

    (@isaumya)

    Hi @sholaytech,
    First of all the issue was that the cache rules are not supposed to have the https:// in the hostname. Secondly I’ve updated the Rule 3 by adding an additional check for a dokan cookie that is used in your website. That was was not present by default, but your site needed it.

    Compare the rule 3 present in implementation guide and the modified rule I have shared above, you will see what I mean.

    Also cf-cache-status is?DYNAMIC means that the page is being bypassed from cache and it is being served from the origin server which is what supposed to happen for any logged-in user session. So, it’s normal.

    When you log-out the wp login session cookies are still there due to which you are seeing the DYNAMIC. When you see this, check the Request Header section in the chrome dev tools (just below the response header) and look in the cookie section and share that data here.

    Generally speaking this plugin works best on sites where the frontend users don’t have to login to the site and only the site owner, admins, editor login to the site to add content. This is because when a user login the pages should always needs to be served from the origin server as the output is dynamically generated.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Using the cache Everything PageRule on ECommerce site But Cannot Stay Logged in’ is closed to new replies.