• asafm7

    (@asafm7)


    Hello.

    I hope my reverse engineering is correct.

    These are the details:

    • I’m using the “Enable AJAX loading” option.
    • I’m using a translation file (via Loco).
    • I’m using page cache (caching the entire HTML).
    • Because of the translation, some JavaScript code is being inlined.
    • This code contains nonces: https://drive.google.com/file/d/14dOqHlPhdAlGOb9lZOEsvj-BBB2HvfLi/view?usp=drivesdk
    • As it is inlined, this code is being cached – including the nonces.
    • After 24 hours, the nonces aren’t valid anymore.
    • Because the nonces aren’t valid, the Add to Wishlist button not showing up (the Ajax load_fragments returns false).

    If this is correct, how can we solve it?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter asafm7

    (@asafm7)

    I now understand it is a broader nonce and caching issue.

    Maybe an ESI LiteSpeed integration can be considered. TI Wishlist has one.

    Plugin Support Juan Coronel

    (@juaancmendez)

    Hello there,
    we hope you’re doing well!

    Unfortunately, our plugin does not have official integration with caching plugins. At the moment the only possible solutions to problems with the cache is to activate AJAX loading, or add the following exclusions:

    • [ add the url of the page wishlist ]
    • [ add the url of the page wishlist ]/* (for all wishlist page endpoints)
    • add?yith_wcwl_session_*?cookies

    Please let me know any news.

    Best regards.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Translation + Page Cache = Broken Add to Wishlist button’ is closed to new replies.