Joomla 4.x Contact form fronted blocked with LSCache Plugin 1.5.1 for Joomla 4

#1
I've experienced this problem:

My live website couldn't send any email from frontend contact email form on a Joomla 4.2.2 installation (both italian and english contact form).
After checking the differences with a local site with Joomla 4.1.5 (that worked fine) I've solved the problem.
I disabled LiteSpeed Cache Plugin ... when I disable it everything work fine (both italian and english contact form).
I've solved it with difference between live site joomla 4.2.2 an local site joomla 4.1.5 (an older version of the site that worked - there I haven't installed LiteSpeed Cache Plugin).
The version I've installed was that specific taken from https://www.litespeedtech.com/products/cache-plugins/joomla-acceleration/download
Version LSCache Plugin 1.5.1 for Joomla 4

Now I've to figure out how LiteSpeed Cache could work correctly with Joomla Contacts.

Anyone as suggestions ?

Thanks in advance

Mauro
 

serpent_driver

Well-Known Member
#8
What happens if you enter
/it/contattaci.html
or
/en/contact-us.html
into the input for excluding URLs to be cached?

This should work, but there is still a hard core method to prevent URLs from being cached.
 
#9
On /it/ nothing is sent and also didn't appear message "Thank you for sending email".
On /en/ it say "The security check does not match. The request was aborted to prevent any security breaches. Try again." but if you compile form it send email, it show message "Thank you for sending email" .. and email arrive to recipient.
 

serpent_driver

Well-Known Member
#12
The screenshot already displays what you are looking for. It is the "x-litespeed-cache" header and this header has "hit" value on contact form. That means that your contact form is cached, but should either have miss header, no-cache or no cache header. That doesn't fully explain the issue, though, because the form is sent through $_POST and $_POST requests are generally not cached. I see the problem more in the fact that you are obviously using a CDN service. You should disable this service to test and then see if the problem is still there.
 

Wuhua Chen

Active Member
Staff member
#15
hi,
Thanks for report, I tried to reproduce this problem, and found a form validate token problem,the joomla3 code no longer work in joomla4, so I replaced those code and submit a commit:
https://github.com/litespeedtech/lscache-joomla/commit/a0fc23d84b7a588c2736244ddc9f87bb2d2574a6
you may update the latest joomla4 plugin package in:
https://github.com/litespeedtech/ls...7b4c365f7d15bb13057af3c5c1746a4bb884b571276e6
If still have any problem, please let me know.
thanks and best regards,
Wuhua Chen
 
Top