Home Forums WoodMart support forum Recently Viewed (Gutenberg) and W3 Total Cache

Recently Viewed (Gutenberg) and W3 Total Cache

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #673067

    Alex
    Participant

    I display the Recently Viewed on all pages through the Gutenberg Products block (from the theme)

    Update with AJAX on page load – is enabled

    I noticed a problem: if W3 Total Cache caching is disabled – the block works correctly, if W3 Total Cache caching is enabled, then products that the person has not visited appear in the block and a strange sequence. At the same time, I have already made many exceptions in W3 Total Cache so that there are no problems with the theme, it is probably not enough and some more are needed.

    How to check:
    When viewing pages at the bottom before the brand carousel, you will see the Recently Viewed block

    For those authorized on the site (for example, in the admin): I have caching disabled – the block will work correctly
    For those not authorized: I have caching enabled – the block will work incorrectly

    #673072

    Artem Temos
    Keymaster

    Hello,

    Please record a video that demonstrates the problem so we can understand and reproduce it on your website.

    Kind Regards

    #673088

    Alex
    Participant

    Example of a problem in the video: previously cleared the browser cache and cookies, incognito mode on the video.

    The first 3 products were added to the block normally, when switching to 4, another product is visible in the block, to which the transition was not made (the end of the video – yellow packaging). Most likely, another user was accessing the site at the same time, it was cached and returned to me. If you do the same with an authorized user (in the admin), then you will not find such a problem.

    #673090

    Alex
    Participant

    The problem is easier to identify if another user or several (from a different IP) access the site in parallel and visit another product.

    It just happens that when there is 1 user, then the problem may not be seen, if there are several – it is more obvious

    #673505

    Artem Temos
    Keymaster

    Could you please provide us with your FTP access so we can troubleshoot this issue?

    #673507

    Alex
    Participant

    Hold on, I just don’t know how to fix this via FTP. And why is this access needed?

    #673823

    Artem Temos
    Keymaster

    It is somehow related to the custom code in your child theme https://monosnap.com/file/RS7HUa6RfTGtmksnfTmNZM7xphZasP
    Try to remove it and test how it works.

    #673866

    Alex
    Participant

    Removing the code fragment did not help (I added it as an additional element according to the data https://rankmath.com/kb/exclude-sitemaps-from-caching/)

    If it is related to the sitemap, then it is possible through this W3 Total Cache function:
    Page Cache section, Cache Preload block:
    – Update interval
    – Pages per interval
    – Automatically prime the page cache
    – Sitemap URL

    #673868

    Alex
    Participant

    Another (unlikely) reason is the use of Speculation rules (prerender, eager)

    #674426

    Artem Temos
    Keymaster

    Try to apply the patch 674350 and clear your browser cache. Let us know how it works.

    #674475

    Alex
    Participant

    I cleared the cache and cookies. I confirm that the problem with the incorrect display of the last viewed products has been resolved. Thank you very much!

    #674525

    Artem Temos
    Keymaster

    Great, you are welcome! Feel free to contact us if you have any further questions.

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