Home Forums WoodMart support forum Problem with login sidebar when WP Rocket page cache is activated

Problem with login sidebar when WP Rocket page cache is activated

Viewing 24 posts - 1 through 24 (of 24 total)
  • Author
    Posts
  • #351153

    Rom2021
    Participant

    Hello, the sidebar works in a bizarre way if wp rocket page cache is activated.
    I’ve tried to contacted the wp rocket support, they say that:
    “1) Regarding the login / logout links in your upper menu, are these being generated and updated using PHP? If so, then that makes them incompatible with page caching.

    That’s because WP Rocket converts all of the PHP and MySQL processes on a given page into static HTML output instead (as do most page caching plugins) — which means a PHP-based login / logout link on any page which has already been cached won’t be updated again until the cache is cleared.

    For an explanation of how page caching works, you might find this post useful:
    http://blog.wp-rocket.me/wordpress-page-caching-explained-in-plain-english/

    One way you could test to see if the problem is definitely related to the page caching would be to temporarily install and activate the helper plugin from this article:

    Disable Page Caching

    If the problem with the login resolves after that, then you’ll know these links are not compatible with page caching.

    Dynamic login links must rely 100% on AJAX / JavaScript to be protected from the page caching — otherwise, they can only be updated when the cache is cleared.”

    You can check the issue in the video.
    This issue is reproduced in this way:
    1) enter in the site.
    2) close the browser.
    3) reopen the browser and enter in the site.

    It seems that the first cached page served after reopening the browser is not friendly for login sidebar.

    #351205

    Hello,

    Please check this manual on how to configure WP Rocket plugin correctly: https://space.xtemos.com/wordpress-performance-optimization-the-ultimate-guide-in-2021#Step_4

    If the problem persists, please let us know.

    Best Regards

    #351254

    Rom2021
    Participant

    hello, I’ve already followed this manual which is helpful, and I have excluded all necessary Js files but the problem persists. here are the credentials for backend. Please login and check.
    p.s. You can create a client account for testing if you want

    #351575

    Artem Temos
    Keymaster

    Hello,

    We checked your video but we don’t see anything wrong there. Could you please send us step-by-step instructions about how to reproduce the problem?

    Kind Regards

    #351690

    Rom2021
    Participant

    Frontend behaviour
    Current situation:
    1, open the site and consent the cookie.
    2,click to open side bar and digit credentials
    3, click “Login”
    4, after that the page is reloaded click the login/registrati to reopen the sidebar.
    5,insert credentials FOR ANOTHER TIME in the sidebar and click “Login”
    6, user is finally logged in with success.

    The ideal one:
    1, open the site and consent the cookie.
    2,click to open side bar and digit credentials
    3, click “Login”
    4,user is finally logged in with success.

    The problem is that user cannot login with success in the first time that he enters the credentials. This issue can be reproduced if the page cache is enabled.
    in fact, on the page which is not cached( for exemple wishlist), there isn’t this problem.

    Please check the site.

    #351722

    Artem Temos
    Keymaster

    Please, send the username and password that you use for the test so we can reproduce it.

    #351730

    Rom2021
    Participant

    here are the credentials

    #351868

    Artem Temos
    Keymaster

    Please, send us your FTP access so we can troubleshoot this problem further.

    #351982

    Rom2021
    Participant

    here are the ftp credentials

    #351991

    Artem Temos
    Keymaster

    Hello,

    Try to add the following PHP code snippet to the child theme functions.php file to fix this

    add_filter(
    	'init',
    	function() {
    		if ( isset( $_REQUEST['woocommerce-login-nonce'] ) ) {
    			$_REQUEST['woocommerce-login-nonce'] = wp_create_nonce( 'woocommerce-login' );
    		}
    	}
    );

    Regards

    #352016

    Rom2021
    Participant

    Thank you for your help, this bug is solved!
    Unfortunately, there is an another bug on the cart page.
    For testing, you can add a the product that I show you in the private content

    • This reply was modified 2 years, 9 months ago by Rom2021.
    #352026

    Artem Temos
    Keymaster

    Could you please check the FTP access? We can’t connect to your server at the moment https://gyazo.com/18847f60dd3cd7d0ac2eaa4fa0d584dc

    Kind Regards

    #352034

    Rom2021
    Participant

    Please try this password with the same username and ip address

    #352173

    Artem Temos
    Keymaster

    We have fixed this issue on your website. Please, check how it works now.

    #352341

    Rom2021
    Participant

    Hello, thank you for your work, the error is not showing any more on the site.
    But I have 2 doubts:
    1, Isn’t the upsell section in the cart page is a carousel? Because I’ve setted 8 upsell products for a single product, on the mobile both of them are shown with carousel, but on the desktop only the first 4 is shown and there isn’t possibility to see other 4 items.
    2, What was causing the error that you’ve fixed?

    #352770

    Artem Temos
    Keymaster

    Hello,

    The problem is still not fixed, unfortunately. It looks like something on your website sanitize the script and remove && signs. Try to temporarily disable all external plugins so we can check what is wrong there.

    Kind Regards

    #353225

    Rom2021
    Participant

    Hello, unfortunately, we can’t disable external plugins on production site.
    But I’ve created a staging site for you.
    You can access it with the same credentials

    #353226

    Artem Temos
    Keymaster

    We can’t enter your WordPress dashboard. Please, provide us with a valid admin password.

    #353232

    Rom2021
    Participant

    hello, here are the credentials

    #353375

    Artem Temos
    Keymaster

    Hello,

    Please, check how it works now.

    Kind Regards

    #353592

    Rom2021
    Participant

    hello, nothing is changed.
    the problem is not solved

    #353703

    Artem Temos
    Keymaster

    We don’t see any problems with the carousel now. Here is a short video https://gyazo.com/1b0fc8c12449c95f6a91d6a3d01845bd

    #353996

    Rom2021
    Participant

    ok, it is working. I confirm it.
    I thought that you haven’t changed the production one.

    #354117

    Artem Temos
    Keymaster

    OK, great. Feel free to contact us if you have any further questions.

Tagged: 

Viewing 24 posts - 1 through 24 (of 24 total)