I have a basic Contact form built in a site I manage for a client. But for some reason, the form fails to submit if I'm (or the user using the site) isn't logged into the site (CMS). But this site is a basic marketing site, so visitors to the site do not have Craft CMS user accounts. Any idea what could be happening here? The logs don't help.
This might not help but I've had a similar problem with a couple of my own modules and then with LInkVault that I went around in circles with. It suddenly stopped allowing non logged in users from downloading files. I contacted support who spotted the issue and fixed it in minutes. They gave this message:
Link Vault’s FrontEndController class has the allowAnonymous property set to true so that can’t be part of the problem
then a few minutes later:
Apparently, a recent Craft update added some logic in the craft\web\Controller::init() method that converts boolean allowAnonymous values to an integer which was part of the check that determines whether guests should be able to access a controller action. Link Vault’s front end controller had its own init() method but it wasn’t calling the parent’s init() method. So that is fixed now.
I leave this here in case it's any help either to this specific problem or anyone else with modules that run in to this issue.