• Hello. I am using TI WooCommerce Wishlist on several stores and we are having a specific issue when the LSCache plugin is enabled. We are using Openlitespeed webservers with PHP 8.2.

    The plugin throws a “Something went wrong” error whenever we try to remove a product from a wishlist. The issue has been described in more detail in a support thread I opened under the LSCache plugin support forum.

    I believe the problem might be related to LSCache’s setting to cache nonces using ESI. If I completely disable the caching (which can be done via the plugin itself, or via a special URL parameter) then the removal of a product happens just fine. Otherwise it throws a “Something went wrong” error. Looks like LSCache modifies something on these nonces which may be throwing the wishlist off. Strangely enough though, everything else on our stores work just fine, this is the only issue of this type we are observing.

    So far the LSCache developers have not come up with a solution, plus I noticed that TI WooCommerce Wishlist has explicit support for this plugin, so I decided to open a support thread here as well.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author templateinvaders

    (@templateinvaders)

    Hey there!

    I’m sorry to hear about the trouble you’re having with LSCache. We’re here to help!

    Just to check – have you tried excluding the wishlist page from the cache for guests as well? Sometimes this can help solve any unexpected hiccups.

    To help us dig deeper into this, it would be great if you could share a link where we can test the issue firsthand. Rest assured, you can share it privately with our team through the support chat in the plugin settings. This way, we can take a closer look and get to the bottom of things.

    Thread Starter denisgomesfranco

    (@denisgomesfranco)

    Hi, thanks for getting back!

    Yes it was excluded from cache, and I can confirm that by inspecting the headers. And by the way, the LSCache team implemented something I suggested them a while ago: the option to exclude a page from cache via a toggle on the page itself (when editing it). It is quite handy so that you don’t have to manually add the URL for the page in the plugin’s settings.

    I will check how I can send you some test credentials but I think in the meantime you could simulate the error by firing up an Openlitespeed server and using the LSCache plugin. I really think the problem has to do with the plugin caching the nonces.

    In my other post I referred to an old Github thread that mentioned something along these lines but with the EDD plugin.

    Plugin Author templateinvaders

    (@templateinvaders)

    Thanks for the further details and your active engagement in resolving this issue.

    If the problem is related to cached nonces, the issue should resolve immediately after you purge all caches. I suggest giving that a try as the next step.

    For your reference, our plugin previews are running on LightSpeed with cache enabled and we haven’t encountered such an issue. You can test it out here: https://wishlist2.templateinvaders.com/

    So if you can provide access where we can test exactly your setup issue we can do debugging.

    Thread Starter denisgomesfranco

    (@denisgomesfranco)

    Even after doing a full site purge and reloading the wishlist page, the error still remains.

    Not sure if it helps but here are the headers of the AJAX call with the caching on (which causes the error):

    tinvwl-product_id: 1119
    tinvwl-action: remove
    tinvwl-security: <esi:include src='/?lsesi=nonce&esi=eyJhY3Rpb24iOiJ3cF9yZXN0IiwiX2xzX3NpbGVuY2UiOnRydWV9&_hash=91a68344264740568739464df812f9cb' as-var='1' />
    tinvwl-paged: 1
    tinvwl-per-page: 10
    tinvwl-sharekey: b31756

    And here are the headers of the AJAX call with the caching off. To turn the caching off I add the ?LSCWP_CTRL=before_optm URL parameter to any page of the site, which temporarily disables LSCache for that page.

    tinvwl-product_id: 1119
    tinvwl-action: remove
    tinvwl-security: 170070fef1
    tinvwl-paged: 1
    tinvwl-per-page: 10
    tinvwl-sharekey: b31756

    The only difference between these two is the tinvwl-security header. I checked your demo site and your tinvwl-security does not have that ESI include directive. I have ESI enabled in the plugin settings in my stores. So I deduce the LSCache plugin is encoding and caching that specific security nonce, and since it is getting modified, this is causing the error. However as TI WooCommerce Wishlist declares compatibility with LSCache I figured it should be working and perhaps this is a bug or something.

    The Github thread I mentioned earlier had a reply that seemed to indicate the person managed to write a code that would force LSCache to bypass caching for a specific nonce.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘“Something went wrong” error when LSCache is enabled’ is closed to new replies.