Guest Purchase - Is invalid

  • Posts: 157
  • Thank you received: 7
  • Hikaserial Subscription Hikashop Business
1 day 29 minutes ago #372917

-- url of the page with the problem -- : community.advancn.org
-- HikaShop version -- : 6.5.2
-- Joomla version -- : 5.4.7
-- PHP version -- : 8.4.23
-- Error-message(debug-mod must be tuned on) -- : Invalid Token

Hello.
When I attempt to make a purchase as a Guest the system states "Invalid Token"

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 85985
  • Thank you received: 14149
  • MODERATOR
19 hours 8 minutes ago #372919

Hello,

Your shop pages are served from the LiteSpeed cache. I loaded community.advancn.org/estore twice, from two different sessions, and both times the answer came with the header "x-litespeed-cache: hit", without any session cookie, and with exactly the same security token in the page (csrf.token 870646592487c9cbc27f8e4769348d76). So each guest sends a token which belongs to another visitor's old session and HikaShop refuses it with "Invalid Token". Logged in users don't have the problem because their pages are not taken from the cache.

Please exclude the HikaShop pages from that cache and purge it. If you use the LiteSpeed Cache plugin for Joomla, add com_hikashop and the cart, checkout and shop menu items to its exclusion list. If the cache is activated on the server with the .htaccess file instead, this kind of rule will do it :

RewriteCond %{REQUEST_URI} ^/(estore|cart|checkout)
RewriteRule .* - [E=Cache-Control:no-cache]

Please also check that the "System - Page Cache" plugin of Joomla is disabled and that the cache is turned off in the global configuration of Joomla, as they create the same problem.

Please Log in or Create an account to join the conversation.

Time to create page: 0.182 seconds
Powered by Kunena Forum