• Resolved rolandscriven

    (@rolandscriven)


    I have enabled caching for logged in users using a hook (litespeed_control_force_cacheable)

    But for the woocommerce bookings calendar ajax call: wc_bookings_find_booked_day_blocks I get a 403 error for this call when the next logged in visitors goes to the page. This is immediate so it’s not a nonce issue.

    I’ve been struggling with this for a while.

    Thank you

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support qtwrk

    (@qtwrk)

    what if , on 2nd login user , before this 403 error , you do a purge all , what happens by then ?

    Thread Starter rolandscriven

    (@rolandscriven)

    Thank you for the reply. If I purge all between then there is no 403 error. It’s the combination of being cached and logged in which produces the error. I can be logged in with no cache hit and it’s fine. I can be logged out with cache hits and it’s fine.

    Plugin Support qtwrk

    (@qtwrk)

    okay , replace the purge action to attach a random query

    like ?test to the page before you do the booking thing , what does it show ?

    Thread Starter rolandscriven

    (@rolandscriven)

    If I visit as the second logged in user (customer) and append the parameter ?test to the url and reload then the non-cached version is served and the 403 error is not present.

    Plugin Support qtwrk

    (@qtwrk)

    okay , I think it still has something to do with nonce , or maybe it has its own one-time-verification token

    please check with booking support , if they have any hook we can use to fire purge API to purge cache after someone booked

    Thread Starter rolandscriven

    (@rolandscriven)

    Thank you – in my scenario a booking has not taken place. It may be related to sessions somehow.

    Plugin Support qtwrk

    (@qtwrk)

    please try , grab one URL that has booking form , make it no-cacheable , does issue ocurre ?

    Thread Starter rolandscriven

    (@rolandscriven)

    Thank you. To confirm the issue (the 403 error for the Woocommerce Bookings calendar ajax call: wc_bookings_find_booked_day_blocks) is only present for the second+ logged in user when public caching is enabled and the user is logged in. It also happens if user 1 (the first user) logs in and out (with caching enabled). It doesn’t happen if user 1 hits refresh and gets a cache hit this way.

    1.) If caching is DISABLED and the user is logged in then there is no issue.
    2.) If cached is enabled and the user is NOT logged in then there is no issue.

    – The issue only occurs when there is caching and the user is logged in (on subsequent visits or it’s the next user).

    Thank you

    Plugin Support qtwrk

    (@qtwrk)

    please create a ticket by mail to support at litespeedtech.com with reference link to this topic , we will investigate further

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Woocommerce bookings 403 error for wc_bookings_find_booked_day_blocks’ is closed to new replies.